UnityExtensions.ArrayDrawer icon indicating copy to clipboard operation
UnityExtensions.ArrayDrawer copied to clipboard

Default values for properties are not set

Open rutkoski opened this issue 4 years ago • 1 comments

When you add the first element to a list of a subtype, the subtype's default property values are not set.

Ex.:

public class Subtype {
  public int value = -1;
}

public Subtype[] values;

values[].value is created as 0, not -1.

rutkoski avatar May 14 '21 15:05 rutkoski

This is an issue with Unity, not the array drawer. It is only responsible for rendering the array with a more useful UI

garettbass avatar May 14 '21 16:05 garettbass