예제 #1
0
        protected override void OnDestroy()
        {
            commandHandler  = null;
            defaultCommands = null;

            logReader.OnDestroy();
            logReader = null;

            base.OnDestroy();
        }
예제 #2
0
        protected override void Awake()
        {
            base.Awake();
            DontDestroyOnLoad(true);

            ObjectSelector  = GetComponent <ObjectSelector>();
            commandHandler  = new CommandHandler();
            defaultCommands = new DefaultCommandAdder();
            logReader       = new DefaultLogReader();

            scrollRect = console.GetComponentInChildren <ScrollRect>();

            defaultCommands.AddCommands();

            inputField.onEndEdit.AddListener(OnSubmitCommand);

            ObjectSelector.enabled = console.activeSelf;
            selectedObjectWindow.SetActive(console.activeSelf);
        }