Search Unity

Applying multiple selected Overrides of a variant

Discussion in 'Prefabs' started by pojoih, Jul 23, 2019.

  1. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    171
    Hi,
    I read you're working on this feature and I wanna ask how it's coming along? It would be very helpful between the already existing "Apply All" Button and selecting and overriding every single change manually.

    Thanks and keep up the good work!
     
  2. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,612
    Hi,

    This feature is currently on pause while we work in-context editing and various bug fixes.

    The feature to apply/revert multiple selected overrides turned out to require more work than anticipated due to cases where components have dependencies on other components. In this case the overrides need to be applied/reverted in a specific order in order to not create errors. Figuring out this order is the tricky bit. It has to handle these two types of dependencies for applying:
    • You can’t apply an added component if it depends on other added components (because it would then exist on the Prefab asset without the components it depends on).
    • You can’t apply a removed component if other removed components depend on it (because the other components on the Prefab Asset (where they still exist) would then exist without the component they depend on).
    And these two types of dependencies for reverting:
    • You can’t revert an added component if other added components depend on it (because the other added components would then exist on the Prefab instance without the component they depend on).
    • You can’t revert a removed component if it depends on other removed components (because it would then exist on the Prefab instance without the components it depends on).
    Or, if we implemented a way to temporarily switch off dependency checks, we'd still need to find another way to ensure consistency is maintained.

    Nothing that can't be done, but it just increased the complexity significantly compared to what it otherwise would have been, which is the reason this didn't turn out to be a quick fix, and ended up being put on pause for now.
     
    pojoih likes this.
  3. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    171
    Thanks Rune for detailed insight. Maybe I'm not seeing the bigger picture, but don't you do a dependency check when reverting or applying just one component already? In the current system, I already can't apply a change which is dependent from things outside of the prefab.
    The multiple revert/apply approach should just be this, but on a list of objects and simply fail on an object which cannot handle the override...

    EDIT: Okay, just figured out what you mean with "specific order". That's indeed not trivial... understood :)
     
    runevision likes this.
  4. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,612
    This feature is now done and will be in Unity 2020.1.
     
    pojoih likes this.