Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Suggestion: property locking

Discussion in 'Prefabs' started by plindberg, Jun 20, 2018.

  1. plindberg

    plindberg

    Joined:
    Nov 25, 2016
    Posts:
    18
    It would be great if it was possible to "lock" a property on a prefab, so that overrides of that property made on instances cannot be applied back to the original prefab.

    This could help prevent situations where someone hits save on a prefab without being aware that that instance contains changes to some property that should not be propagated to all other instances. The only way to edit "locked" properties would be to find the original prefab in the project view, and enter edit mode from there.
     
    MechEthan and frankCIQ like this.
  2. frankCIQ

    frankCIQ

    Joined:
    Apr 6, 2018
    Posts:
    5
    This would be great.
     
  3. Arycama

    Arycama

    Joined:
    May 25, 2014
    Posts:
    183
    This should definitely be a feature. A project I am working on has many issues with level designers modifying static flags when they aren't supposed to, setting cast/receive shadows on mesh renderers when they need to be left a certain way, lightmap size, etc.

    It should be optional of course, but components on a prefab should definitely be lockable so that those properties must always be the same across instances. Otherwise prefabs are still extremely prone to costly mistakes in a reasonably-sized studio.
     
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,221
  5. Arycama

    Arycama

    Joined:
    May 25, 2014
    Posts:
    183
    Yep, that's exactly what I would like. However it wouldn't necessarily have to be hidden, just read-only for the level artist. Although being able to toggle hidden on/off would of course be a nice feature too.
     
  6. plindberg

    plindberg

    Joined:
    Nov 25, 2016
    Posts:
    18
    Yes! But it sounds like your idea is slightly different; you want to lock properties completely, so that they can't be modified at all, whereas I only want to prevent designers from 'applying' them to the original. Both ways are equally useful, I think, so an option to have either would be great.
     
  7. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Sounds like this is already covered in our FAQ, see the "Black Box" section
     
  8. Arycama

    Arycama

    Joined:
    May 25, 2014
    Posts:
    183
    Ah right, I must have missed that in the FAQ section. Looking forward to it in a future release, though the current nested prefab features are still great!


    Yeah, ideally you'd be able to select properties that must be the same across all instances of a prefab. You'd be able to specify some properties to be editable though. This would help level designers know what they should and shouldn't edit etc.

    Sounds like it's something they want to include in a future release though, so I'm happy with the current features.