public static void AddRange(this SerializedProperty arrayProperty, IList elements) { for (int i = 0; i < elements.Count; i++) { arrayProperty.Add(elements[i]); } }
public static void EnsureCapacity(this SerializedProperty arrayProperty, int capacity, System.Func <object> getDefaultValue = null) { getDefaultValue = getDefaultValue ?? delegate { return(null); }; while (arrayProperty.arraySize < capacity) { arrayProperty.Add(getDefaultValue()); } }
public static SerializedProperty Insert(this SerializedProperty arrayProperty, object element, int index) { SerializedProperty elementProperty; elementProperty = arrayProperty.Add(element); arrayProperty.MoveArrayElement(arrayProperty.arraySize - 1, index); return(elementProperty); }
public void AddComponent(IComponentOld component, int index) { Components.Add(component); ComponentIndices.Add(index); DummyValue.Add(component.GetTypeName()); }