Thanks for the information @Mads-Nyholm . That would have caught me by surprise. I’ll convert all my prefabs before I upgrade.
I learned the hard way the references to the converted prefabs were broken. It is a price I am willing to pay, but I understand it may be too disruptive to others.
Is this something that you guys can solve? Maybe go through all other prefabs and scenes and fix the references?
@Mads-Nyholm is this feature considered by Unity or in research ?
In the early stage of a project, there is no way to know in advance that some prefabs will share a same base in the future, unless doing extensive planning and sticking to the plan, which is too unrealistic.
I’ve come across this issue several times in most of my projects for years, could really help to have a solution.
For now, everything has to be done manually, deleting the existing prefabs, loosing all references, making a new root prefab by hand, creating the variants, replacing the old references with the new variants…
Even if the instances loose their references, @goldbug solution is still the only way there is to not rebuild everything, so I don’t really get your argument…
We have researched various attempts but none have had a perfect solution where all references can survive after a Variant inheritance refactor. We are very well aware of the pain it is causing. The problem is that all serialized references in other files will break due to the way fileIDs are generated for Prefab objects that have nested instances. And changing the fileID generation would be a breaking change so we have ruled that out so far.
Currently we are looking at a solution that will allow this refactor but with the consequence that only the root Transform keeps its fileID and therefore default overrides and references to this root instance Transform will survive the inheritance refactor. We would need to show a dialog with a warning in the Editor and note in the documentation what the consequences would be using this inheritance refactoring functionality. And some references would need to be rewired up again in scenes and other prefabs.
@Mads-Nyholm - how about a built in way of using composition of many prefabs, but not by nested prefabs.
Imagine a new unity built in component that lets you choose multiple prefabs that you want their components and values of those prefabs to be attached to this new prefab. And any changes made to attached prefabs will reflect on the new prefab unless over ridden. This can be accomplished with many different nested prefabs, but why not add this functionality for just the root or parent.
Is this the best place to look out for updates or is there a thread / feature tracker page somewhere else? I think it’s safe to say this would be a huge workflow improvement for everyone, so we’re keen to stay updated on progress here.
I think even if there was an imperfect way to do this, that broke a few references but at least got my prefabs to become variants like I want, I would still find that very useful.
Unity still has many longstanding, multi year long issues (some over a decade) that the community has been clamoring for because of this belief that breaking changes are to be avoided at all cost.
Sure, the engine is used by many studios to make a staggering amount of games and we don’t want to cause friction with breaking changes all the time. Problem is, they also want these features, and not having them cause even more friction due to awful workflows in many situations.
At the very least you guys could add these longstanding breaking changes in major versions. This way the engine wouldn’t need to be stuck in the past forever and it would be a very clear delineation.
Unity 6 would be a great opportunity to do just that. I hope you guys take it to finally address so many pain points that have been there simply because fixing them would be “uncomfortable”.
A closer name is suggested to be “release candidate“ but they claim “Preview” fits because they keep patching it to make it more stable before general availability, though they also say its production supported right now anyway.