Trouble getting default values on array

Hi all!

Not sure what I’m doing wrong here but I can’t seem to get the default values to be applied on an array in my scriptable object.

    public List<TestClass> test;

    [Serializable]
    public class TestClass
    {
        public TestClass()
        {
            value1 = 1;
            value2 = 1;
        }
        [Range(0, 2)] public float value1 = 1;
        [Range(0, 2)] public float value2 = 1;
    }

7943704--1016401--Screen Shot 2022-03-06 at 9.02.36 am.png

Any ideas what I might be doing wrong there?
Thanks!
Pete

Pretty sure this just isn’t possible in Unity without writing a full-on custom property inspector. There’s quite a few long discussionary posts about it if you google a bit.

Oh okay, I thought it was just something to do with scriptable objects. Sorry! :slight_smile:
Yeah it looks like it’s a little tricky to do.