Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="listProperty"></param>
 protected virtual void ListAreaSection()
 {
     for (int i = 0; i < ListProperty.arraySize; i++)
     {
         ListItemAreaSection(ListProperty.GetArrayElementAtIndex(i), i);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Header Section. This overridden version displays the Add Object Field.
        /// </summary>
        /// <param name="property">The main SerializedProperty the list belongs to</param>
        /// <param name="listProperty">The list SerializedProperty that has the associated array attached.</param>
        /// <param name="label">Label provided to the main PropertyField</param>
        protected override void HeaderSection(GUIContent label)
        {
            T go = null;

            if ((go = AddObjectField(go)) != null)
            {
                int newItemIndex = ListProperty.arraySize;
                ListProperty.InsertArrayElementAtIndex(newItemIndex);
                ListProperty.GetArrayElementAtIndex(newItemIndex).objectReferenceValue = go;
            }
        }