I want to hide a list in the inspector and show it only under specific conditions.
[SerializeField, HideInInspector]
private List<int> _myList = null;
In my custom editor, I then try to show the property field.
SerializedProperty serializedProperty = serializedObject.FindProperty("_myList");
EditorGUILayout.PropertyField(serializedProperty, true);
However, even though I set includeChildren
to true, it shows the name of the property, but nothing else (size or children).
Is there a way to make this work ?