SUSMachine icon indicating copy to clipboard operation
SUSMachine copied to clipboard

Don't call OnUpdate / OnFixedUpdate methods when gameObject stateMachine is on is disabled

Open JamesYFC opened this issue 3 years ago • 0 comments

add Enable/Disable functions to AutoCloser (and rename it) that tell the state machine manager to stop or resume calling the relevant update functions

double check that the TimeInState counting functionality still works correctly (should it count or not while the gameObject is disabled?)

this might have to be togglable behaviour or something. sometimes there is value in being able to turn off the game object but still allowing these life cycle functions to run. Purists would hate it, but it does make certain scenarios more convenient.

if togglable, we'll use a modified version of AutoCloser instead, or a separate component that contains the new magic methods

JamesYFC avatar Mar 29 '22 05:03 JamesYFC