onFinish callback on graphs

Forums 💬 NodeCanvas ⚙️ Support onFinish callback on graphs

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #17193
    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.

      #17199
      w
      Participant

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

        #17198
        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!

          #17197
          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? 🙂

            #17196
            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 🙂

              #17195
              w
              Participant

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

                #17194
                Gavalakis
                Keymaster

                  Thank you! You are very welcome 🙂

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