onFinish callback on graphs

NodeCanvas Forums Support onFinish callback on graphs

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #13472
    w
    Participant

    The onFinish callback in Graph.cs is invoked regardless of whether the GraphOwner completes playing or is stopped by calling StopBehaviour().
    this causes trouble as we use onFinish callback to trigger loading the next level and I don’t want the load to happen if it’s stopped explicitly.

    So i was wondering if it make sense to add a success parameter to StopBehaviour() so that onFinish doesn’t always trigger with success=true.

    #13473
    w
    Participant

    an alternative solution would be providing a function to clear up onFinish actions so that we can do something like

    #13474
    Gavalakis
    Keymaster

    Hello,

    Hmm… I think that adding an optional bool parameter for StopBehaviour like in your first suggestion, makes total sense and I can definitely add this in the next version officially:

    Would that work for you?
    I could of course also add your second suggestion ClearOnFinishActions() if required 🙂

    Let me know.
    Thank you!

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

    #13477
    w
    Participant

    Hey Gavalakis, thanks for your response. Adding an optional boolean definitely works. It’d be awesome if you could add clearOnFinishActions too, if that doesn’t go against your design.

    Are you planning on releasing the new version any time soon? 🙂

    #13485
    Gavalakis
    Keymaster

    Hello again,

    The new version has just gone live recently!
    It does include your first suggestion (optional boolean parameter), but didn’t manage to squeeze in the ClearOnFinishActrions since I did send the new version before I had the chance to check on your new reply above 🙂

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

    #13486
    w
    Participant

    Congratulations on the new version! Thanks for making the changes so quickly!

    #13504
    Gavalakis
    Keymaster

    Thank you! You are very welcome 🙂

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

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