Add OnStateTransition(State transitionToState) To GraphOwner

Forums 💬 NodeCanvas 🗨️ General Discussion Add OnStateTransition(State transitionToState) To GraphOwner

  • This topic has 0 replies, 2 voices, and was last updated 7 years ago by Gavalakis.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13562
    meatloaf
    Participant

      Currently I’m trying to interface some code with my FSM. I was wondering it it would be possible at some point to add a OnStateTransitionEvent(State transitionToState). Currently you have an onFinish event, but right now i’m finding working with only this event a little limiting.

      #13565
      Gavalakis
      Keymaster

        Hey,
        Sorry for the late reply!
        Of course. Just to clarify though, what “onFinish” event are you refering to specifically? 🙂
        Are you refering to adding ‘OnStateTransitionEvent’ on FSM class, or as a callback similar to OnStateEnter, OnStateExit and OnStateUpdate that is called on MonoBehaviours attached on the gameobject of the FSMOwner?

        Please let me know.
        Thanks!

        #13564
        meatloaf
        Participant

          Sorry for the late reply!

          I’m specifically talking about the Graph onFinish event.

          I can access it by creating my own custom state and grabbing it like this

          So maybe adding a onTransition(State transitionToState) event to the graph would be nice addition.

          Hope that’s clear :)!

          #13563
          Gavalakis
          Keymaster

            Hey,

            It’s clear now, yes 🙂
            I have just added an ‘onTransitionMade’ event for the next version. Please note though, that this event is added in the FSM class rather than the Graph class, since such transitions are only relevant and take place in the context of FSMs of course.
            If you want, I can tell you the required code changes to add this event now by the way.

            Thanks 🙂

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