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

Feedback Feature request: Mark as override, Prevent from applying to prefab

Discussion in 'Prefabs' started by Epsilon_Delta, Jul 15, 2020.

  1. Epsilon_Delta

    Epsilon_Delta

    Joined:
    Mar 14, 2018
    Posts:
    205
    Hello,

    working with prefabs it would be very useful to have:

    1. A context menu, like for overridden attributes:
    upload_2020-7-15_11-10-49.png
    but for every not-overridden Inspector attribute with option "Mark as override". Now when I want an attribute to be an override on prefab instance but to have the same value as prefab asset (so that the change of attribute on prefab asset in the future would not affect the value on prefab instance), I have to change it and then change it again to previous value. Btw, is it somehow possible for us users to extend Unity editor this way? I presume this shouldn't be that hard to implement, but couldn't figure it out. This is a nice to have feature, the next one is more important.

    2. Again, same context menu but for both overridden and not-overridden Inspector attributes, with an option "Prevent from applying to prefab asset/base" . There could be a red indicator upload_2020-7-15_11-18-1.png to show that this value will not be applied when using "Apply all" button or even shown in "Overrides" window. I understand that this can be quite complicated to incorporate in existing prefab system.

    Similar discussions:
    https://forum.unity.com/threads/is-it-possible-to-make-a-field-a-default-override.647443/
    https://forum.unity.com/threads/feature-request-attribute-for-marking-fields-variable.636067/

    Somewhat similar:
    https://forum.unity.com/threads/req...-any-modifications-in-scene-instances.740909/
    https://forum.unity.com/threads/prevent-prefab-instance-overrides.689737/
     
    Last edited: Jul 16, 2020
  2. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    335
    Bump. Marking specific fields as transient, and therefore excluding them from "apply to prefab" would be very handy. Some fields are instance-specific, they do not make sense for applying to the prefab.
     
    Last edited: Sep 2, 2021
    TV4Fun likes this.
  3. Peter_Olsted

    Peter_Olsted

    Unity Technologies

    Joined:
    Apr 19, 2021
    Posts:
    74
    Epsilon_Delta

    1. While Editor UI can be modded extensively (e.g. the Asset Store has several plugins which reimagine the Hierarchy and offer workflow benefits) they are all still subject the same underlying Unity API's. The features you suggest would require internal development in the Prefab system. As your forum links show, such ideas have been around a while, but the lack of user consensus requires that we carefully assess the impact across a wide user base before adding features which could adversely impact workflow for some users. That said, your suggestions are noted and will certainly be considered in future Prefab system development. Thanks for your input.

    2: We are actually working on something similar to this, so that in the most common use cases the editor will disable the Apply buttons if there is nothing that can be applied, including changing the look of the blue property override when it cannot be applied.

    And I just realized it was posted last year, but hey, it's worked on.
     
    Last edited: Sep 6, 2021
  4. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    335
    Just for clarification: Does this mean we will be able to prevent particular fields from being applied to the prefab?
     
  5. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    @starikcetin no unfortunately not. The way we planned to support what you would like to do is by allowing you to mark properties driven, through the DrivenPropertyManager, which unfortunately is currently not part of the public API.
     
  6. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    335
    @SteenLund I see, thank you. Is it under development? Or in the plans for the near future?
     
  7. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    @starikcetin It is actually all done, it is just that the API is currently not public. There are plans to make the API public, but I don't know when it is scheduled to be done
     
    NotaNaN, TV4Fun and starikcetin like this.
  8. TV4Fun

    TV4Fun

    Joined:
    Jan 10, 2020
    Posts:
    31
    Bump for this as well. Seeing overrides on all my prefabs for every little adjustment they make to themselves makes it hard to see overrides that are actually meaningful.
     
    Marc-Saubion likes this.
  9. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    368
    Something like that would be of great help in many cases. Screenshot_46.png
     
  10. JessHarvey

    JessHarvey

    Joined:
    Nov 6, 2018
    Posts:
    5
    Any update on this?