Search Unity

Save prefab overrides back to the original prefab asset

Discussion in 'Prefabs' started by liortal, Sep 14, 2018.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    I'm playing around with the new prefabs workflow right now.

    Previously, i could add a prefab to the scene and make modifications to it. If i wanted to, i could always hit "Apply" and those changes got saved to the original prefab asset.

    Is there such an option with the new workflow? suppose that i've made changes to a prefab in the scene (not in the prefab window where it lives in isolation). Is there any way to apply those changes back to the prefab asset ?
     
    Deeeds and TooManySugar like this.
  2. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Click on the "Overrides" dropdown and choose "apply all"
     
  3. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Aparently this is now a two click operation involving going to the bottom of a potentially long list if your prefab is complex.

    Productivity 4.0
     
    liortal likes this.
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    This is the right forum to be cynical about it. And asking for changing it.
     
  5. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Just open it up in prefab mode instead of dragging and dropping it into your scene, make your changes there and they'll get applied. No need to apply overrides.

    It's a good thing that the Apply All button is hidden in a submenu now. It is rarely what I want to do when altering an instantiated prefab. If I ever make changes to an instantiated prefab that I want to apply to the source prefab (and every other instantiated copy of that prefab in the entire game (!!!)), it's generally something small that I forgot to do in prefab edit mode so I generally want to cherry pick a specific change to apply. If I need to make edits that are heavier than that, I just open up the prefab asset for editing.

    Apply All is potentially really dangerous operation in a prefab heavy game. It should be hidden behind an additional click. Its almost like they made these changes for a reason, not just to make your life harder. :rolleyes:
     
    Last edited: Sep 16, 2018
    flashframe likes this.
  6. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    In our game, we use prefabs not only for reuse, but for breaking down large scenes into essentially collection of prefabs.
    From time to time, we'd like to re-apply scene changes into the prefab since that is really our intention (no need to modify the prefab in the scene, and it's only used once in that scene).

    For this purpose it was pretty convenient for us to simply hit Apply and save those changes to the original prefab.
     
    Deeeds and TokyoWarfareProject like this.
  7. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    This is not the question being asked nor a solution to the problem being discussed. It's a diversion, at best.