No odin inspector with SerializedScriptableObject

Issue #169 resolved
Tikkub
created an issue

Hi, i created a SerializedScriptableObject like that:

    [CreateAssetMenu(fileName = "TestScriptableObject", menuName = "TestScriptableObject")]
    public class TestScriptableObject : SerializedScriptableObject
    {
        public List<int> intList;
    }

When i create an instance of this ScriptableObject and select it in the hierarchy the inspector show a regular array for the intList. It should show the Odin list drawer.

I'm using Unity 2017.1.

Is there something i'm doing wrong ?

Comments (4)

  1. Tikkub reporter

    Ok i found the issue.

    I accidentaly embed the ScriptableObject class definition inside another class instead of inside the namespace. Like that:

    namespace Test
    {
        public class TestClass
        {
            [CreateAssetMenu(fileName = "TestScriptableObject", menuName = "TestScriptableObject")]
            public class TestScriptableObject : SerializedScriptableObject
            {
                public List<int> intList;
            }
        }
    }
    

    I can create a TestScriptableObject but its not using Odin inspector althought it appears in the Odin Preferences Editor Types. Anyway easy fix! Thank you!

  2. Log in to comment