[BUG] Pause/Resume happens simultaneously

NodeCanvas Forums Support [BUG] Pause/Resume happens simultaneously

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16262
    covis
    Participant

    Hi.

    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().

    #16283
    Gavalakis
    Keymaster

    Hello there,

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

    Thank you!

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

    #16287
    covis
    Participant

    Yeah sorry. Im using NC 3.2.2 but its UpdateGraph(); line 850 on 3.2.5.

    #16299
    Gavalakis
    Keymaster

    Hello again and sorry for the late reply.

    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?

    Thank you!

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

    #16305
    covis
    Participant

    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.

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