コード例 #1
0
 private static void OnEditorApplicationOnPlayModeStateChanged(PlayModeStateChange change)
 {
     if (change != PlayModeStateChange.ExitingPlayMode)
     {
         return;
     }
     ManagedLog.LogMethod(type: ManagedLog.Type.Structure);
     StateMachines.Clear();
 }
コード例 #2
0
        private static void InitializeOnLoadMethod()
        {
            ManagedLog.LogMethod(type: ManagedLog.Type.Structure);

            PlayerLoopUtilities.AppendToPlayerLoop <Update.ScriptRunBehaviourUpdate>(typeof(BasicStateMachineEngine), Update);
#if UNITY_EDITOR
            EditorApplication.playModeStateChanged += OnEditorApplicationOnPlayModeStateChanged;
#endif
        }
コード例 #3
0
        private static void InitializeOnLoadMethod()
        {
            ManagedLog.LogMethod(type: ManagedLog.Type.Structure);
            SceneManager.sceneLoaded   += SceneManagerOnSceneLoaded;
            SceneManager.sceneUnloaded += SceneManagerOnSceneUnloaded;

            PlayerLoopUtilities.AppendToPlayerLoop <Update.ScriptRunBehaviourUpdate>(typeof(ManagedLog), OnUpdate);

            // SceneManagerOnSceneLoaded doesn't get called for initial scene in builds, we need to call it on load to capture Managed Objects
            #if !UNITY_EDITOR
            var activeScene = SceneManager.GetActiveScene();
            AddAllManagedObjectsInScene(activeScene);
            #endif
        }
コード例 #4
0
ファイル: GameWindow.cs プロジェクト: alpdogan1/GamePack
 private static void Log(object msg)
 {
     ManagedLog.LogMethod(msg, color: Colors.PowderBlue, type: ManagedLog.Type.Structure, stackOffset: 1);
 }
コード例 #5
0
 private static void SceneManagerOnSceneUnloaded(Scene arg0)
 {
     ManagedLog.LogMethod(type: ManagedLog.Type.Structure);
     Views.RemoveAll(view => !view);
     Controllers.RemoveAll(controllerBase => !controllerBase);
 }
コード例 #6
0
 // This doesn't get called for initial scene in builds.
 private static void SceneManagerOnSceneLoaded(Scene scene, LoadSceneMode arg1)
 {
     ManagedLog.LogMethod(type: ManagedLog.Type.Structure);
     AddAllManagedObjectsInScene(scene);
     // TODO: We need to keep track of newly instantiated views and destroyed ones
 }
コード例 #7
0
 private static void InitializeOnEnterPlayMode()
 {
     ManagedLog.LogMethod(type: ManagedLog.Type.Structure);
     Controllers.Clear();
     Views.Clear();
 }
コード例 #8
0
 private static void InitializeOnLoadMethod()
 {
     ManagedLog.LogMethod(type: ManagedLog.Type.Structure);
     EditorSceneManager.activeSceneChangedInEditMode += OnActiveSceneChangedInEditMode;
     InitScene(SceneManager.GetActiveScene());
 }
コード例 #9
0
        private static void InitializeOnLoadMethod()
        {
            ManagedLog.LogMethod(type: ManagedLog.Type.Structure);

            PlayerLoopUtilities.AppendToPlayerLoop <Update.ScriptRunBehaviourUpdate>(typeof(ManagedLog), LateUpdate);
        }
コード例 #10
0
ファイル: LoggingExample.cs プロジェクト: alpdogan1/GamePack
 private void LogMethodTest()
 {
     ManagedLog.LogMethod();
 }
コード例 #11
0
 protected void LogMethod(object obj = null, ManagedLog.Type type = ManagedLog.Type.Default, Object context = null) => ManagedLog.LogMethod(obj: obj, type: type, context: context, stackOffset: 1);
コード例 #12
0
 private static void InitializeOnEnterPlayMode(EnterPlayModeOptions options)
 {
     ManagedLog.LogMethod(type: ManagedLog.Type.Structure);
     StateMachines.Clear();
 }