Пример #1
0
        protected override void DrawProperty(MightySerializedField mightyMember, SerializedProperty property, Rotation2DAttribute attribute)
        {
            if (property.IsCollection())
            {
                MightyGUIUtilities.DrawArray(property, index => DrawElement(mightyMember, index, attribute));
                return;
            }

            DrawRotation2D(property, attribute);
        }
Пример #2
0
        protected override void DrawProperty(MightySerializedField serializedField, SerializedProperty property,
                                             AssetOnlyAttribute attribute)
        {
            if (property.IsCollection())
            {
                MightyGUIUtilities.DrawArray(property, index => DrawElement(serializedField, index, attribute));
                return;
            }

            DrawAssetField(property, attribute);
        }
Пример #3
0
        protected override void DrawProperty(MightySerializedField mightyMember, SerializedProperty property,
                                             ResizableTextAreaAttribute attribute)
        {
            if (property.IsCollection())
            {
                MightyGUIUtilities.DrawArray(property, index => DrawElement(mightyMember, index, attribute));
                return;
            }

            DrawTextArea(property, attribute.Options);
        }
Пример #4
0
        protected override void BeginDrawMember(MightySerializedField serializedField, T attribute,
                                                MightyDrawer.PropertyDrawCallback propertyDrawCallback = null, BasePropertyDrawerAttribute drawerAttribute = null)
        {
            var property = serializedField.Property;

            if (property.IsCollection())
            {
                MightyGUIUtilities.DrawArray(property, index =>
                {
                    BeginDrawElement(serializedField, index, attribute);
                    propertyDrawCallback?.Invoke(serializedField, property, drawerAttribute);
                    EndDrawElement(serializedField, index, attribute);
                });
                return;
            }

            BeginLayout(serializedField, attribute);
            propertyDrawCallback?.Invoke(serializedField, property, drawerAttribute);
        }