SerializedProperty with children class fields

public class MyClass {
public string name;
}

public class MyChildrenClass : MyClass {
    public int live  = 10;
}

public class MyObject : ScriptableObject {
    public MyClass myClass = new MyChildrenClass();
}

How can I get the MyChildrenClass properties form the SerializedProperty?

SerializedObject object = new SerializedObject(new MyObject());
SerializedProperty myClassSerialized = object.FindProperty("myClass");

//Doesnt get live property becouse it's interpretated as "MyClass"
SerializedProperty m_live = myClassSerialized.FindPropertyRelative("live");

You can iterate through child props of serialised classes by using an enumerator. You can do this a couple different ways, one being using GetEnumerator:

var childEnum = serializedObject.FindProperty("myClass").GetEnumerator();
while (childEnum.MoveNext())
{
    var current = childEnum.Current as SerializedProperty;
    if (current.name == "live")
    {
        // Do things
    }
}

Or you can use Next or NextVisible with the enterChildren argument set to true:

var myClassProps = serializedObject.FindProperty("myClass");
while (myClassProps.NextVisible(true))
{
    if (myClassProps.name == "live")
    {
        // Do things
    }
}

You can use property.GetEndProperty() and SerializedProperty.EqualContents():

            public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
            {
                var endProperty = property.GetEndProperty();
                while (property.NextVisible(true))
                {
                    if (SerializedProperty.EqualContents(property, endProperty))
                    {
                        break;
                    }
                   ...

Hello.

I am on unity 2018.3

these solutions don’t work in
public override void OnInspectorGUI() {}
Any ideas for using in a custom inspector,Hello,
I am trying both of these solutions and they do not work. Any ideas?