Toggle to set Prefab Definition as default (v.1.4.1b5)

Vong 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 6

As per your response in [link] on having Prefab Instance be the default panel in v.1.4.1b5

Could we also have a toggle in Settings to have Prefab Definition as the default panel? (if that wasn't already planned)

In workflows that instantiate everything from nested/variant prefabs, having variables that only exist on the Prefab Instance should probably be actively avoided. I understand most workflows would prefer Prefab Instance as the default (I suppose?) but a toggle would be greatly appreciated.

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

One of my design principles is to avoid options unless absolutely necessary. In the workflow you describe, you would be editing the prefabs themselves in prefab isolation mode, correct? In that case, the Instance panel wouldn't even show up. 

Having instance show by default also matches the general Unity workflow. When on an instance, you are seeing the overrides first, not the definition values. To see the definition values, you must open the prefab in isolation.

Finally, from the amount of bugs reports related to not being able to assign scene references to variables I get every week, I'm concluding that the current layout is confusing, and a swap would be beneficial.

For these reasons, I'll be declining this request, sorry!

First off, totally agree with you that the default should be Prefab Instance - no argument from me there.

In the workflow I describe. I edit prefabs in Scene and use the Override dropdown to selectively implement them in to the Definition. I try to avoid using too much Isolation Mode as it can get confusing when the nesting is more than one level deep, with certain levels also being Variants.

In light of your design principle (and further workflow testing) I guess my actual pain point is rather that there is no way to selectively apply Object Variables.. Currently if I mistakenly create Object variables in Scene (or in Isolation mode, but wrong level) then I either have to enter Isolation Mode to recreate them, or Apply All and then enter Isolation Mode to delete ones that should be Instance only.

Pivoting from my original suggestion: Would it instead be possible(easy?) to right-click and "Apply to Prefab "x" " in either the Override dropdown, the Inspector, and/or the Variables window? (though personally I don't care so much for the last one) Which would more match the Unity workflow 

Also, just to tack on some usability notes (though I guess much of what I've replied should have been in a new topic anyways...)

Creating a new Object Variable (or changing its values) either in Prefab Definition or in Isolation mode doesn't make it appear on that prefab in the Scene. I thought this was intended at first, if rather awkward due to Unity workflow pushing you to have the prefab in Scene, but the behaviour doesn't seem to be the same for other components. (except for position/rotation, which Unity has rightly said are exceptions anyways)

Also, creating a new Object Variable in the Prefab Definition tab immediately bounces you to the Graph Variable tab (bug?)

So most of the issues you describe are related to how we are stuck serializing variables. Basically, variables are serialized as a whole in one chunk, because we use FullSerializer, not the built-in Unity serialization. That means there's only two possible override states: anything is overridden, or nothing is overridden. If you have any override (even just a value change in an existing variable), then making any change to the prefab definition will not trickle down to the instances.

That's why we can't have per-variable apply / revert (I wish we could!). But it's also something that seems like it would be possible with Odin Serializer, which we'll be moving to in Bolt 2 to replace FullSerializer. The main reason for the move is that Odin is much faster than FS, but it also has a nice prefab-modification support layer too, so we'll try to take advantage of that for variables (and classes).

Regarding the jump-to-graph issue, I think that's a bug I introduced in v.1.4.1b5 (ugh!) while trying to keep the prefab display in sync. I'll have another look. 

Hm, so like many things, the answer remains to fall in to a coma and magically recover when Bolt 2 becomes stable I see I see.. haaa

Yes, sorry for the meandering. Recognized a pain point but misdiagnosed the reason.


Indeed, but there's unfortunately no "quick fix" for such things; they are core design issues we learned from over the past 2 years, and we're hoping to fix them "once and for all" with major core changes in Bolt 2. Sorry for the delay!