Files
kaiju/Assets/Util/AudioSourceButton.cs
T
2022-06-16 11:14:05 +10:00

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;
}
}