How do I automatically assign the length of an array based on the length of another and push a string to it? Such that in for loop when I copy the string, it will automatically get copied to all the array strings.
public string[] ArrayOfStrings;
public Image[] images;
void Start()
{
for(int i = 0; i < images.Length; i++)
{
ArrayOfStrings[i] = "Testing String";
}
}
OnValidate()unity method. It's a good idea to make computation on editor mode when it's possible. Don't forget to callUnityEditor.EditorUtility.SetDirty(this)after your change on theOnValidationmethod to force serialization of your gameobject.