Exemple #1
0
        internal void Initialize(Type collectionItemType, Object obj)
        {
            if (initialized)
            {
                return;
            }

            collectionItemDropdown = new CollectionItemDropdown(
                new AdvancedDropdownState(),
                collectionItemType
                );

            currentObject = obj;
            initialized   = true;
        }
Exemple #2
0
        private void Initialize(SerializedProperty property)
        {
            if (initialized)
            {
                return;
            }

            Type arrayOrListType = fieldInfo.FieldType.GetArrayOrListType();
            Type itemType        = arrayOrListType != null ? arrayOrListType : fieldInfo.FieldType;

            collectionItemDropdown = new CollectionItemDropdown(
                new AdvancedDropdownState(),
                itemType
                );

            currentObject = property.serializedObject.targetObject;
            initialized   = true;
        }