[Feature Request] OnResume callback on ActionTask

Forums 💬 NodeCanvas ⚙️ Support [Feature Request] OnResume callback on ActionTask

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17318
    w
    Participant

      I have a custom ActionTask that drives audio/video playback. Is it possible to add an OnResume callback to the ActionTask script so that I can resume playback when the graph is unpaused? I guess I can determine playstate in OnUpdate loop myself but it’d be really handy if there’s a callback function i can directly use just like OnPause.

      Thanks

      #17321
      Gavalakis
      Keymaster

        Hello,

        For your information, when a graph resumes, the “OnExecute” method is called once again, where you can use it as a resume, possibly even doing some boolean check if required.
        Please let me know if that works for you, or if you need an explicit Resume call.

        Thanks.

        #17320
        w
        Participant

          An explicit resume callback would be extremely handy, as that enables us to resume timeline playback by subscribing to the event.
          I can modify the graph code to add the callback myself, but I’d prefer to leave the nodeCanvas package intact.

          #17319
          Gavalakis
          Keymaster

            Hello again,

            I will look into adding an explicit Resume callback. The problem with that though, would be that if I do, I will then also have to remove the OnExecute from being called when the action resumes (which is what happens now), and that might create problems with backwards compatibility, so I will have to make sure this does not happen 🙂
            Until that is done though, you can do something like this for example:

            Let me know what you think.
            Thank you!

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