Built-in tree creator doesn't work with prefab variants

As the title says; It modifies/replaces the base prefab instead of saving the/as variant.
Or did i maybe miss an important step to make it work with the variant feature?

  • I saved the tree object as prefab, rightclicked → create prefab variant and edited the variant.

Sounds like a bug, please file a bug report

Done. (Case 1148366)

1 Like

Interestingly, i now received the answer that this is by design… In this case it appears to be not a good design as it works against expectation and has hidden negative side effects. Atleast it was also mentioned that the issue will be kept open until an idea on how to resolve the UX part of this issue is found. I’m not sure though why the generated data can’t be stored with the variant. Fixing this would benefit a lot more use cases imo.

Hi @Flavelius

The problem comes from the fact that the TreeData is an added asset object in the base prefab.
Variants only instantiate the GameObject hierarchy from the base Prefab not any added asset objects, those are simply referenced.

So when working on a variant of the Tree prefab you are in many cases touching the TreeData of the base prefab, which is by design and therefore this issue is not classified as a bug.

That said. The Tree editor needs to be revisited and updated to handle variants, but this is low priority.

1 Like

Thanks for clarifying; i understand that this is why it’s the way it is. What i was trying to say, in a not very clear way, as far as i understand variants are baked out to full assets anyway on build; so this generated data should be stored in the variant asset instead of the base (AddObjectToAsset in user-space). I can think of Probuilder having to deal with similar potential issues.

Hi,
GameObjects are baked out in the variant not the TreeData, this is baked into the base and referenced from the Variant.

And yes ProBuilder will also have to handle variants.

Yup, tree editor definitely could use an update! :smile: