Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Prevent Prefabs from being changed by overrides

Discussion in 'Prefabs' started by Adam_Streck, Sep 8, 2020.

  1. Adam_Streck

    Adam_Streck

    Joined:
    Jul 31, 2013
    Posts:
    26
    I could not find how to do this and did not find a thread either, but it seems like a basic functionality so maybe I'm missing something.

    I want to be able to declare a prefab as "final" in the sense that I don't want to be allowed to apply overrides. I want to be only allowed to change the prefab if I actually open the prefab object itself.

    Why? Mainly when nesting e.g. UI elements, it sometimes happen that I accidentally apply the overrides to a wrong level (e.g. instead of a button variant the override applies to a core button) and in more complex cases this is almost impossible to undo without painstakingly going through all affected higher-level prefabs.

    Any suggestions?
     
  2. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,877
    See the FAQ entry about "Can we get the ability to treat Prefabs as “black boxes” or "encapsulated" where by default properties can't be edited (overridden) on instances of the Prefab?"
     
  3. Adam_Streck

    Adam_Streck

    Joined:
    Jul 31, 2013
    Posts:
    26
    Thank you for the info - I see that the text is over 4 years old with the statement:

    Both are things we have been looking into, and would like to do for future releases.

    Is there any update on the topic since?
     
  4. Adam_Streck

    Adam_Streck

    Joined:
    Jul 31, 2013
    Posts:
    26
    Additionally - I find it hard to believe nobody has developed an extensions to this if it's not possible in the editor itself. Anybody would have a suggestions for an appropriate extension please?
     
  5. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,772
    I saw Unity demo this very feature years ago but it never came out with the new prefab system. Did they abandon it? If so why?
     
  6. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,877
    The text has been updated continuously and is up to date. Encapsulated Prefabs is something we've actively been working on this year, but it's not at a point where we can say what release it might ship in.
     
  7. Adam_Streck

    Adam_Streck

    Joined:
    Jul 31, 2013
    Posts:
    26
    Sorry, my, bad I misread Joined as Posted.

    Thank you for the info again. I hope it will come soon than as I really find it quite difficult to work with nested prefabs with a bigger team without that.
     
    unity_CO_-tD6Q4S6y6g likes this.