0
Completed

On Enter State event in transitions

Ilumisoft 4 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 4

Is there something similar to "Start" or "On Enter State" working in transitions to trigger them automatically when a state is entered?

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

You should be able to use Update to do just that!

I'll keep this open as it would make sense to add support for On Enter State too.

Thanks for the fast reply! Yeah Update works fine in most situations, but since it is called regularly it might result in undesired multiple calls if a wait node is also attached:


Therefore having a one time call like On Enter State would be more convenient for such a situation :)

Working on it

Bolt will start sending On Enter State and On Exit State events to transitions from v.1.2.3 alpha 3, let me know if you encounter any issue!

The order will be for example, in an A > B > C machine where everything transitions On Enter State:

  1. A State: On Enter State
  2. A-B Transition: On Enter State
  3. A-B Transition: Trigger
  4. A State: On Exit State
  5. A-B Transition: On Exit State
  6. B State: On Enter State
  7. B-C Transition: On Enter State
  8. B-C Transition: Trigger
  9. B State: On Exit State
  10. B-C Transition: On Exit State
  11. C State: On Enter State