using UnityEngine; [RequireComponent(typeof(Camera))] public class BackgroundRenderer : MonoBehaviour { public Texture2D backgroundTexture; void OnGUI() { if (Event.current.type == EventType.Repaint) { Graphics.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), backgroundTexture); } } }