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.
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.
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.
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: