State Unit - Exit Event In Transition When Stopping ?

Guy Rabiller 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 4

When stopping a State Unit, the internal State Nodes receive an Exit State Event. Are the Transition Nodes supposed to receive that same event as well if stopping a State Unit happens right in the middle of an internal Transition Node evaluation ?

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Satisfaction mark by Guy Rabiller 3 years ago

Hmm after a second thought, I think my question is a bit silly, because Transitions are actually making State Nodes to Enter/Exit so if a State Unit is stopped and a Transition Node is being evaluated (with an Update event for instance) then the State Node above will receive the Exit State Event anyway..

Pending Review

That's right. If you stop a state graph, what will happen is:

  • Active states get sent On Exit State
  • Outgoing transitions from them get sent On Exit State
  • Both stop listening for events

Is that blocking you in your design patterns?

No, on the contrary, that's what I wanted to know and that's perfect. Thanks!