Cannot Reproduce

Prefabs Lose Variables / Macro Reference

Xefier Games 2 months ago • updated by Lazlo Bonin (Lead Developer) 3 weeks ago 16 1 duplicate

Bolt 1.4.1

Unity 2018.3.6f1

No matter how many times I revert the nested prefab it always resets the State Machine and Variables components to default settings making it unusable.

Bolt Version:
Unity Version:
.NET Version:

Duplicates 1

Under Review

Hi Xefier,

Is there any chance this is on a prefab that was created in a version of Unity before nested prefabs? If so, you would need to Reimport the prefab asset to fix the issue (see this section of the Known Issues).

This Unity Project was started in 2018.3

Something is very wrong in 2018.3, I had been working on a Macro half a day and there's nothing in the Macro at all now.

The project was started in 2018.3

Exacly same issue on our end but it's not happend only for prefabs but also for regular gameobjects. I just close and open scene and macro just gone from state/flow machine .... 

I had a Windows Update just before this happened and they've caused instability issues with Unity before, does this sound relevant to anyone else?

Other than that nothing has been updated, ported etc.

Upon further inspection, the problem might be unrelated to git. Object variables simply won't be applied to instances. Neither will the assigned flow or state macros.

This sounds very similar to the issues I'm experiencing. +1 to this.

Under Review

Hi Syver,

Can you post some simple reproduction steps to recreate the issue?

Hi everyone!

As always, clear repro steps is the only way I can track & fix this bug.

What exactly is resetting? How did you configure the prefabs and the variables? 

Please give a step-by-step list of instructions to trigger the bug from a blank scene/project.


I encountered the same issue. I try to describe how it happened.

1.) Made a GameObject and put prefab children inside it in the scene. (Parent object "BrickSpawnMachine" has no flow machine on it)

2.) Pulled parent object from scene in prefab folder. 

3.) Then deleted GameObject from 1.) from scene

4.) Pulled it later back from my prefab folder.

5.) Variables and Macros from the child prefabs (BrickSpawner) are missing

The child prefab itself (BrickSpawner) is still alright on itself. But the variables and macros ont BrickSpawner prefabs inside the BrickSpawnMachine prefab are gone.


Hi Limpertus,

I tried reproducing your exact example, but variables seem to persist at every step of the way. Here's a video of it, tell me if I did anything wrong:

Ok, looking at your video, I found out that I forgot one important detail. I captured a video too, so you can see my workflow (may be better than writing too much text). Hopefully it isn't a Bolt problem, but only me being too stupid too understand the new nested prefab workflow correctly :D

I see, so from what I understand, the data loss occurs when you apply all prefab overrides on the parent prefab. I'll try reproducing this on the most recent Unity version (2018.3.14) and let you know what I find.

Cannot Reproduce

Alright, so I tried reproducing this but I don't see a data loss still.

Unity: 2018.3.14f1

Bolt: 1.4.2


  1. Create empty "Child" game object
  2. Add test variable
  3. Turn Child into prefab
  4. Remove Child instance from scene
  5. Create empty "Parent" game object
  6. Add new Child prefab instance as child
  7. Duplicate a few times
  8. Turn Parent into a prefab
  9. Delete Parent instance from scene
  10. Spawn new Parent instance from prefab
  11. Add new object variable to one of the Child instances of Parent instance
  12. Apply all overrides via Parent inspector
  13. Delete Parent instance from scene
  14. Spawn new Parent instance from prefab

At this point in your video, there would be a data loss. In my attempt, there was none. 

Video of my reproduction: https://streamable.com/bvp9s

If you can provide precise steps that reproduce your issue on the latest Unity+Bolt version in a clean project, please post them. For now, I'll have to mark this as Cannot Reproduce again.

While slightly different, I think mine is a related issue, but in 2018.3.7f (1.4.2 net4) creating a variant prefab would have the variant lose Object Variables and the State Machine reference, no matter how many time you apply/revert changes.

Updating to 2018.3.12f1 seems to have fixed it, putting down repro steps in case it helps.

1. Make Cube Gameobject. Attach Flow/State Machine. Set an Object variable test = 10
2. Drag in to Project to make Prefab
3. Change value of test to 200 or something
4. Drag in to Project and make it a Variant Prefab.
5. (I forget if you need to instantiate a new Variant or if it affects the current one in the scene)
6. Check Variant. All object variables are missing. Flow Macro reference may be missing, or the component may be empty altogether.

Hi AiSard, 

If your issue was resolved by updating Unity, I'll assume it's an internal prefab bug that they addressed and won't pursue reproducing it any further.