Search Unity

exposing just certain parameters on prefab

Discussion in 'Prefabs' started by tslancik, Jan 20, 2020.

  1. tslancik

    tslancik

    Joined:
    Apr 21, 2019
    Posts:
    14
    From what I can see prefab instance still seems to expose all the children and their parameters for editing (overriding), which however powerful, it can be very messy and difficult to work with, also dangerous as any artist can change anything

    Maybe I'm misunderstanding purpose of prefabs and this would be a different type of instanteable game asset type, but essentially I'd like a way to create a prefab that has only a few specific parameters of my choice exposed from all the possible parameters on all it's children
    so that each instance of such "prefab" in the editor shows only those parameters, doesn't allow to expand the hierarchy or even see/override the actual children or children's parameters, just the chosen, exposed ones directly on the prefab
    (like Houdini's HDA, Unreal's Actor, ...)

    in a similar way as I can create properties in Shader Graph and only those show up as parameters in the inspector for my shader

    this would make it more straightforward to have specialised prefabs that artists will be able to tweak easily but only in a way it is intended, without requiring artists to hunt through the hierarchy for secific parms or even have that freedom and therefore potentially override something they are not supposed to touch

    is such thing possible? Preferably without custom scripting, just like mentioned shader graph feature or the other mentioned softwares
     
    JesOb likes this.
  2. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
  3. tslancik

    tslancik

    Joined:
    Apr 21, 2019
    Posts:
    14
    thanks for the link, the answer makes sense, hopefully you'll find a good solution
    even if it's just defining custom UI properties for the blackboxed prefab and internally linking them to the actual properties with 1-1 connection or some custom relationship