17 lines
377 B
C#
17 lines
377 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class AudioSourceButton : MonoBehaviour {
|
|
public Texture speakerTexture;
|
|
public Texture micTexture;
|
|
|
|
void SetTexture(bool useLoopback) {
|
|
RawImage image = GetComponent<RawImage>();
|
|
|
|
if (!image) return;
|
|
|
|
image.texture = useLoopback
|
|
? speakerTexture
|
|
: micTexture;
|
|
}
|
|
} |