Skip to content

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

@JamesYFC

Description

@JamesYFC

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions