How to get unscaled ElapsedTime from Tasks/OwnerSystem?

NodeCanvas Forums Support How to get unscaled ElapsedTime from Tasks/OwnerSystem?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16068
    zerox
    Participant

    Hi Paradox,

    As far as I know elapsedTime is scaled time. So how can I get the unscaled elapsed time?

    It will be useful when you want to handle other tasks during game pause, for example UI.

    #16077
    Gavalakis
    Keymaster

    Hello there,

    The elapsedTime property in action tasks simply returns how long the action is running/active in seconds. Similarly, the elapsedTime of OwnerSystem (the graph) returns the same, how long is the graph running/active. With that said, if you want to make use of Unity Time.unscaledTime or Time.unscaledDeltaTime, you can directly use those in your action task.

    Or would you rather have an option to make the whole graph be updated using “unscaledDeltaTime” instead of “deltaTime” for elapsed time?

    Let me know.

    Thank you!

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

    #16081
    zerox
    Participant

    No, I only want to unscaledElapsedTime on the action tasks I want, not the entire graph.

    Currently I have to save Time.unscaledTime in OnExecute and check in OnUpdate. If it’s just a few tasks, it won’t be a problem, but if the number of tasks that need it increases, it will be quite inconvenient.

    If possible then can you add unscaledElapsedTime same as elapsedTime?

    #16089
    Gavalakis
    Keymaster

    Hello there,

    I’ve noted your suggestion down and will see adding it 🙂

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

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