Wondering if someone can help me out. I have a Custom editor script to a gameObject with an array of serialized structs. Im having a real tough time settings the field on each struct using editor scripting. Is there a good example out there I can take a look at:
Been look at this but doesn’t go over how to handle arrays
You would use GetArrayElementAtIndex().FindPropertyRelative(“PropName”);
for example;
var serialzedObject = new SerializedObject(target);
var array = serialzedObject.FindProperty("MyArray");
for( var i = 0; i < array.arraySize; i++)
{
var element = array.GetArrayElementAtIndex(i).FindPropertyRelative("MyElement");
//do something with the property
}