Prefab overrides are applied without invervention

A very annoying bug started to occur in 2021.3.13,

Whenever Unity feels like it, it applies on its own all the overrides of a child prefab or instance to the parent prefab. Which completelly breaks the variant / child hierarchy and which is very hard to revert.

Anyone had the same experience lately ?

Hi!
Based on what you described this doesn’t seem to be easily reproduceable, but if you find a way to make the bug happen, please report it with a repro project so we can look into it.
You can find a guide here, on how to report bugs:

Thanks for answering, it’s pretty difficult to troubleshoot. I already reported several issues in the past, however I was looking for some community feedback as well as it’s hard to reproduce. Happens really out of nowhere, I’m doing complexe prefab stuff (like chchild/instances/variants alltogether).

I believe it happened in these situations but I’m not sure :
When I apply a prefab overrides within a nested prefab scene context, while editing the parentmost prefab from a Scene. Huh pretty hard to get.
It doesn’t seem to happen if I apply the prefab overrides within a nested prefab context and I’m editing it from the Project view.

Ex :

Rabbit a variant of AnimalPrefab
Cat a variant of AnimalPrefab

Scene

  • Cat Instance
  • Rabbit Instance
    → Editing Cat
    → Editing AnimalPrefab

Saving my changes in AnimalPrefab, then I sometimes get my Cat overrides included inside the AnimalPrefab. Thus Rabbit now gets both a Cat and a Rabbit mesh (for instance) and AnimalPrefab gets a Cat.

Other case :

  • Cat Instance
  • Rabbit Instance
    → Editing Cat

I then apply some overrides, through the Overrides list, of my Cat to AnimalPrefab and unity sometimes apply ALL the overrides of Cat to AnimalPrefab. Resulting in the same broken prefab state.

It might have something to do with the a cloth plugin that updates the prefabs. I’m troubleshooting right now.
EDIT : It is coming from the plugin. I’m contacting the creator asap.
EDIT2 : Breaking news : IsPartOfVariantPrefab returns false on the root of a variant ? Because the issue is here, they correclty check for variant in the plugin but this line returns false with instance being a Cat (which obviously in my hierarchy is a variant of AnimalPrefab)

@alexsmith123 Is the function only working for child objects and not the prefab variant root itself ?

bool isVariant = PrefabUtility.IsPartOfVariantPrefab(instance);

And here we are : IsPartOfVariantPrefab not working properly