private void Awake() { if (executor == null) { executor = gameObject.AddComponent <ConsoleExecutor>(); } if (gui == null) { gui = gameObject.AddComponent <ConsoleGUI>(); } gui.OnClose += OnGUIClose; gui.enabled = false; }
private void OnValidate() { executor = GetComponent <ConsoleExecutor>(); gui = GetComponent <ConsoleGUI>(); }