Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Easy create new ScriptableObject from Inspector

Discussion in 'Editor & General Support' started by huwb, Jul 4, 2020.

  1. huwb

    huwb

    Joined:
    Oct 19, 2013
    Posts:
    24
    (Apologies in advance if this is a dupe/repost)

    For fields on monobehaviours that accept assets/scriptable object types, i feel it would be beneficial to have a way to quickly populate them with a new asset directly from the inspector. Some potential ideas:

    * If user double clicks empty field in inspector, create dialog opens at path Assets/ with a default file name derived from the type. On confirming the dialog, the resulting asset is assigned to the field.
    * User can right click a field of type scriptableobject and a context menu option is present to create a new asset, which then opens a file dialog as described in the previous point
    * A new button is added in the inspector next to scriptableobject-type fields which opens the new asset dialog, as described in the previous point

    CreateAssetMenuAttribute is nice, and related, but takes more steps and mental effort, for me at least. In particular, something i do as a developer a lot is create temporary assets just to quickly try a config. Being able to very quickly create the asset with a click or two and pressing enter would save me some steps and time and neurons.
     
unityunity