
0
Fixed
Order of operations bug
This one has thrown a big wrench in my project, if anyone else is seeing the same thing, let me know.
It appears that Bolt is doing things in an unintuitive order. I would assume states are supposed to execute as:
- On Enter State
- Update State
- On Exit State
- Transition
- On Enter State (second state in the chain)
But instead it seems to go 1 > 4 > 3 > 5 > 2
Pic and link to a simple scene (just the scene and the script, install bolt first) below.

https://www.dropbox.com/s/dzal1tfnqd9ue99/BoltOrderBug.unitypackage?dl=0
Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Customer support service by UserEcho
Sorry, jumbled up the numbers in my original example.
Hi NeedsLoomis,
Thanks for the bug report. Here's what's happening (or should be!) under the scenes when a state is entered:
This needs to happen first in case you trigger an event from On Enter State that should transition.
You made me realize the need for this change with your bug report here:
http://support.ludiq.io/topics/261-event-timing-issue/
Then, if a transition is triggered:
What I think is going wrong here is the order of Update. It seems that #3 and #4 in my list are not always predictable, and #4 might trigger before #3, which could be the root cause of your issue.
To be clear however, in your initial list, the order isn't correct. Bolt shouldn't do 1-2-3-4-5, it should do 1-2-4-3-5. The only issue here is that 2 (the source state update) is not properly ordered.
I won't have time to fix the issue right away, but it will definitely be included in v.1.0.4.
Ah, thats fair. I think it's still a little counter intuitive to visually see something (the transition) after the state, only to have it do work during it, but it does make sense logically why it would fire before the exit event.
Doesnt really matter to me though, I can work with the update fix alone since I rarely do actual work in the transition :) Glad the Update event going off late is on your radar now, but don't work too hard , you still have a few days left <3
Think I got it fixed:
Let me know if you still have issues in v.1.0.4 after it's published!