Add OnStateTransition(State transitionToState) To GraphOwner

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

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

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

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

    #13896
    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 :)!

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

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

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