using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DebugText : MonoBehaviour { public static string displayText; private Text text; private void Awake() { text = GetComponent(); } // Update is called once per frame void Update() { text.text = string.Format("{0}", displayText); } }