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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question ScriptableObjects in the inspector doesn't work.

Discussion in 'Editor & General Support' started by Smilecookie, Jul 6, 2021.

  1. Smilecookie

    Smilecookie

    Joined:
    Mar 22, 2014
    Posts:
    9
    I was using it without any problem. After upgrading Unity, you cannot view or modify the contents of ScriptableObject through the inspector. The click itself doesn't seem to take effect. It's the same for both Mac and PC. Anyone know why?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,951
    Smilecookie likes this.
  3. Smilecookie

    Smilecookie

    Joined:
    Mar 22, 2014
    Posts:
    9
    Thanks for your advice.
    I've solved this problem, but I noticed a difference from before.

    var asset = ScriptableObject.CreateInstance(assetType.Name);
    asset.hideFlags = HideFlags.NotEditable;

    It was a problem when HideFlags.NotEditable was set.
    Previously, you could see the contents of the array even if you couldn't edit it, but you don't know when, but it seems that you cannot see it because it is not clicked.
    For now, I am using it by setting it to HideFlags.None.
    It seems to have been changed or is a bug.
     
    Kurt-Dekker likes this.