I'am customizing the inspector for one of my scripts which can't be handled by the default inspector and there is a class with nested array of the same type, i don't want know how i can handle arrays using my own code because down the hierarchy there is a class with custom code depending on an enum value, the EditorGUILayout.PropertyField () seems not to be helpful in this cause or i may be not understanding it well, Any solutions?
I find that if you call…
EditorGUILayout.PropertyField(serializedProp, true);
…it works for arrays. The bool value is the includeChildren parameter.
The only visible solution to this case i have found until now is to create a recursive function that draws the required content in the inspector and controls the array items by firstly creating a javacript array and modify its length then converting it to the builtin array with the required type.
This page gives an overview of how you can create your own "Inspectors" from code. Note, that the Unity editor is completely scriptable in and of itself, as well.
http://unity3d.com/support/documentation/ScriptReference/Editor.html