예제 #1
0
    protected virtual void UnregisterRoutine()
    {
        UpdateLoopSettings settings;

        settings = UpdateLoopSettings_CoreUpdate;
        settings.ShouldBeRegistered   = false;
        UpdateLoopSettings_CoreUpdate = settings;

        settings = UpdateLoopSettings_CoreLateUpdate;
        settings.ShouldBeRegistered       = false;
        UpdateLoopSettings_CoreLateUpdate = settings;

        settings = UpdateLoopSettings_CoreFixedUpdate;
        settings.ShouldBeRegistered        = false;
        UpdateLoopSettings_CoreFixedUpdate = settings;

        //For editor lazy initialization.
#if UNITY_EDITOR
        CoreUpdateLoop.TryInitialize();
        CoreFixedUpdateLoop.TryInitialize();
        CoreLateUpdateLoop.TryInitialize();
#endif

        CoreUpdateLoop.Instance.NeedsRemovals      |= UpdateLoopSettings_CoreUpdate.IsValid;
        CoreLateUpdateLoop.Instance.NeedsRemovals  |= UpdateLoopSettings_CoreLateUpdate.IsValid;
        CoreFixedUpdateLoop.Instance.NeedsRemovals |= UpdateLoopSettings_CoreFixedUpdate.IsValid;
    }
예제 #2
0
    protected virtual void RegisterRoutine()
    {
        CoreInitSetup();

        //For editor lazy initialization.
#if UNITY_EDITOR
        CoreUpdateLoop.TryInitialize();
        CoreFixedUpdateLoop.TryInitialize();
        CoreLateUpdateLoop.TryInitialize();
#endif

        CoreUpdateLoop.Instance.EnqueueBehaviour(this);
        CoreLateUpdateLoop.Instance.EnqueueBehaviour(this);
        CoreFixedUpdateLoop.Instance.EnqueueBehaviour(this);
    }