0
Fixed in Beta

Embedded State Machine Sometimes Resets to Macro on Play

Kyle 2 months ago • updated 5 days ago 5

I have an embedded state machine managing my game's HUD. When I hit play, sometimes the state machine source switches to "macro", with no defined macro. Sometimes it works as expected and stays as an embed. I haven't been able to establish a pattern for when/why this happens.

Bolt Version:
1.4.0f7
Unity Version:
2018.2.11f1 personal
.NET Version:
3.5
Cannot Reproduce

Hi Kyle,

Sorry you're having this issue. Unfortunately, without reproduction steps and/or a small project that reproduces the issue, I cannot resolve the issue. Please feel free to comment again if ever you are able to reproduce the bug consistently.

Ok, after a while of not seeing this issue I'm seeing it pretty regularly now. It shows up in a few different forms:

I have a dedicated scene for my UI, with an embedded state machine on my main UI gameobject. When I run just the UI scene by itself, the state machine behaves as expected. When I load the UI scene in additively at runtime, the state machine switches its source to Macro and the embedded graph is lost. Strangely, when I exit play mode, the source stays set to macro until I exit and relaunch Unity, at which point the embedded graph is restored.

I also have a player prefab in my Resources folder that I'm instantiating at runtime. It has a state machine attached with a macro as its source, but when it's instantiated it loses its reference to the macro as well as all its object variables. Similarly, after I exit play mode and inspect the prefab, the state machine stays set to Macro with an empty reference to a macro file until I restart Unity.

I get the following error when running my project:

BoltError.txt

I'm not really sure how to upload a project for testing. I could probably get you access to my repo if the info above isn't sufficient to give any clues. Oh, also, I'm now on Unity 2018.3.0f2, and Bolt 1.4.0f11. Thanks for your time reading this!

Fixed in Beta

Hi Kyle,

Thanks for providing more details. From the stack trace, I can tell that this is related to a bug that was fixed in v.1.4.1b3: https://support.ludiq.io/communities/5/topics/2565-after-upgrading-unity20183bolt1411-cant-work

That seems to have fixed things! Thanks so much for the reply; I really appreciate the support you all offer for Bolt.