Esempio n. 1
0
        private void Awake()
        {
            var airDebugger = TryGetInstance();

            if (airDebugger != this)
            {
                Debug.LogWarning("AirDebugger already instantiated.");
                invalid = true;
                return;
            }

            DontDestroyOnLoad(gameObject);

            ConnectToEditor.RegisterMessageHandler(
                ECMID.Inspector, OnEditorInspectorMessageReceived);

            SceneManager.activeSceneChanged += OnSceneChanged;
        }
Esempio n. 2
0
 private void OnDestroy()
 {
     SceneManager.activeSceneChanged -= OnSceneChanged;
     ConnectToEditor.UnregisterMessageHandler(
         ECMID.Inspector, OnEditorInspectorMessageReceived);
 }