ExpandableMake serializable object expandable. (E.g. ScriptableObject, MonoBehavior)
Known issues:
-
the
Foldoutwill NOT be placed at the left space like a Unity's default foldout component, because Unity limited thePropertyDrawerto be drawn inside the rect Unity gives. Trying outside the rect will make the target non-interactable. But in early Unity (like 2019.1), Unity will forceFoldoutto be out of rect on top leve, but not on array/list level... so you may see different outcomes on different Unity version.If you see unexpected space or overlap between foldout and label, use
Tools-Saints Field-Create or Edit SaintsField Configto change the config. -
ReadOnly(andDisableIf,EnableIf) can NOT disable the expanded fields. This is becauseInspectorElementdoes not work withSetEnable(false), neither withpickingMode=Ignore. This can not be fixed unless Unity fixes it.
- Allow Multiple: No
using SaintsField; [Expandable] public ScriptableObject _scriptable;
