Class defaults in a built-in array

I thought this worked, but it doesn’t seem to be doing so…

Say I have a class:

[System.Serializable]
public class MyClass
 {
	public string thisString = "My Default Text";
	public Color defaultColor = Color.white;
	public bool myBoolean = true;
	public Vector3 myVector3 = new Vector3 (1.0f, -1.0f, 2.0f);
}

And I have a built-in array:

public class MyMainScript : MonoBehaviour {
	public MyClass[] myClasses;
}

I want to populate this array in the inspector, but I would like the defaults from the class MyClass to be set as defaults in the array. Currently they are not. Is there a way to have the defaults in the original class definition appear in the built-in array when elements are added?

This works with a single instance of a class but not with an array, for some reason. However, there is a little trick that might help you out. If you create an array with one element, type your values in the variables and then resize the array, all the new elements will have the same variable values as the first. Not as good as having the defaults automatically entered but it can sometimes save a bit of time.