Search Unity

Feature request: Create UnityEngine.Object instances throw inspector like you create components.

Discussion in 'Editor Workflows' started by AntonPetrov, May 24, 2020.

  1. AntonPetrov

    AntonPetrov

    Joined:
    Dec 27, 2013
    Posts:
    63
    Currently a field of UnityEngine.Object type requires an external object to be assigned either from the scene or from assets.

    So, to create a scriptable object containing collection of other scriptable objects (something like custom component system) we have to create those scriptable objects as an individual assets then reference them. Even if this will be the only reference!

    I propose the possibility to create encapsulated objects like you do with "Add Component" button on GameObject Prefabs. But through the common Inspector UI like this:
    upload_2020-5-24_20-11-33.png

    upload_2020-5-24_20-13-42.png

    Then you edit it as nested object.
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    You can do that manually, with AssetDatabase.AddObjectToAsset.