I stumbled across an edge case bug where calling “GraphOwner.PauseBehaviour();” would trigger ActionTask’s OnPause()” and “OnResume()” simultaneously even though the GraphOwner is actually paused and never resumed.
For a fix I modified Graph.cs line 675 to following : if(isRunning && !isPaused)
I believe its some madness with order of execution because I wasn’t able to reproduce it in minimal test but it does happen on my larger project.
However my setup is something like this if it helps. PauseListener class listens to Action delegate on GameManager class. PauseListener then invokes UnityEvent where I call for GraphOwner.PauseBehaviour().
Can you please let me know what NodeCanvas version you are using so that I can double-check the fix and confirm line #675, because in latest version there is something irrelevant there :).
Doing this change in Update graph, would break the ability to “step-through” the graph (via the step buttons in inspector and graph editor) when the graph is paused. Hmm. Could you please provide some more information on the edge case you encountered and when does it take place so that I could see what other fix there is?
I have custom ActionTask to play a PlayableDirector. So when the graph pauses I also want to pause the PlayableDirector. This is where I use ActionTasks OnPause() and OnResume() for Playable’s pause and resume. The current issue is that ActionTasks Execute() gets called once after pause has already happened triggering unwanted Resume therefore also resuming the PlayableDirector.
Author
Posts
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.