class MAGES::Editor::OverridablePropertyPropertyDrawer

Overview

Property drawer for OverridableProperty<T>. More…

class OverridablePropertyPropertyDrawer: public PropertyDrawer
{
public:
    // methods

    override VisualElement CreatePropertyGUI(SerializedProperty property);
};

Detailed Documentation

Property drawer for OverridableProperty<T>.

┌────────────────────────────────────────────────────────────────────────────────────────────────────┐ ┃ This is a very fragile piece of code. It is a workaround for a Unity bug that prevents ┃ │ the property drawer from working properly. Ideally, property change events should bubble up │ │ for more complicated objects, but it turns out they dont. Also property fields refuse to │ │ display anything other than a serialized object; sooo we have to create a dummy scriptable │ │ object that holds the current underlying value and then copy the value back and forth between │ │ the dummy object and the actual object. │ ┃ … I know… I know… I hate it too. But it works. ┃ └────────────────────────────────────────────────────────────────────────────────────────────────────┘