Class ScyllaUIEdgeInsetsDrawer
UI Toolkit property drawer for ScyllaUIEdgeInsets. Lays out the four per-edge ScyllaUILength fields in a top / right / bottom / left stack so designers can edit the four edges from a single foldout-style group instead of expanding nested struct fields.
Inherited Members
Namespace: Scylla.Core.Editor.Util.UI.Layout
Assembly: ScyllaCore.Editor.dll
Syntax
[CustomPropertyDrawer(typeof(ScyllaUIEdgeInsets))]
public sealed class ScyllaUIEdgeInsetsDrawer : PropertyDrawer
Methods
CreatePropertyGUI(SerializedProperty)
Builds the UI Toolkit property UI for a ScyllaUIEdgeInsets field. The returned element is a UnityEngine.UIElements.Foldout whose content area contains four UnityEditor.UIElements.PropertyField rows - top, right, bottom, and left - each delegating further rendering to ScyllaUILengthDrawer.
Declaration
public override VisualElement CreatePropertyGUI(SerializedProperty property)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | property | The serialized property representing the ScyllaUIEdgeInsets struct. |
Returns
| Type | Description |
|---|---|
| VisualElement | A UnityEngine.UIElements.Foldout containing the four per-edge length editors. |
Overrides
Remarks
The foldout's expand/collapse state is stored in
SessionState (keyed by the serialized object entity ID and property
path) rather than in property.isExpanded, which would mark the
scene or asset dirty every time the designer toggles the foldout.