using UnityEngine; using UnityEngine.UI; public class AudioSourceButton : MonoBehaviour { public Texture speakerTexture; public Texture micTexture; void SetTexture(bool useLoopback) { RawImage image = GetComponent(); if (!image) return; image.texture = useLoopback ? speakerTexture : micTexture; } }