Behaviour Tree to not update when timeScale = 0

NodeCanvas Forums Support Behaviour Tree to not update when timeScale = 0

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17349
    inmaculada
    Participant

    Hi,
    I’m changing Time.timeScale from 1 to 0 in Unity when I want my game to pause and I’ve realized that the BTs still gets updated regardless of the timeScale. What would be then the approppiate way to pause all the BTs in the scene when I change the timeScale in Unity?

    My first approach was to set the Update Mode to ‘Fixed Update’ (it is my understanding that FixedUpdate doesn’t get called when timeScale = 0), but that hasn’t work for me (the BT still gets updated). Plus, I would prefer to keep the BT update in the normal update if possible.

    Thanks a lot

    Attachments:
    You must be logged in to view attached files.
    #17394
    Gavalakis
    Keymaster

    Hello and sorry for the late reply.
    The best way to cease updating all BTs, would be to simply deactivate MonoManager (which is from where all graphs are updated), then re-activate it again when you want. You can do this like so:

    Let me know if that works for you.
    Thank you.

    Join us on Discord: https://discord.gg/97q2Rjh

    #17413
    inmaculada
    Participant

    It does work, thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.