Beispiel #1
0
        public static StratusReorderableList PolymorphicList(StratusOdinSerializedProperty serializedProperty)
        {
            if (!serializedProperty.isArray)
            {
                throw new ArgumentException($"The field {serializedProperty.displayName} is not an array!");
            }

            IList list            = serializedProperty.list;
            Type  baseElementType = Utilities.Reflection.GetIndexedType(list);
            var   reorderableList = new StratusReorderableList(list, baseElementType, true, true, true, true);

            reorderableList.SetPolymorphic(serializedProperty);
            return(reorderableList);
        }