예제 #1
0
        protected void OnDestroy()
        {
            StopContextInternal();
            StopContext();

            Instance = null;
        }
예제 #2
0
        protected void Awake()
        {
            if (!KernelApplication.IsInitialized)
            {
                Debug.LogError("Load <b>Kernel</b> scene and set it as <b>Active</b>");
#if UNITY_EDITOR
                UnityEditor.EditorApplication.isPlaying = false;
#endif
            }

            if (Instance != null)
            {
                Debug.LogErrorFormat("SceneContext with type\"{0}\" already exists", Instance.GetType());
                return;
            }
            Instance = this;

            OnInitializedInternal();
            OnInitialized();
        }