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