diff --git a/src/DebugUI/Assets/DebugUI/Runtime/DebugUIBuilder.cs b/src/DebugUI/Assets/DebugUI/Runtime/DebugUIBuilder.cs index 5819e59..3962d93 100644 --- a/src/DebugUI/Assets/DebugUI/Runtime/DebugUIBuilder.cs +++ b/src/DebugUI/Assets/DebugUI/Runtime/DebugUIBuilder.cs @@ -35,6 +35,7 @@ public VisualElement Build() if (windowOptions != null) { window.Text = windowOptions.Title; + window.Foldout = windowOptions.Foldout; window.SetDraggable(windowOptions.Draggable); } diff --git a/src/DebugUI/Assets/DebugUI/Runtime/DebugWindowOptions.cs b/src/DebugUI/Assets/DebugUI/Runtime/DebugWindowOptions.cs index 1c2734b..3473f66 100644 --- a/src/DebugUI/Assets/DebugUI/Runtime/DebugWindowOptions.cs +++ b/src/DebugUI/Assets/DebugUI/Runtime/DebugWindowOptions.cs @@ -4,5 +4,6 @@ public sealed class DebugWindowOptions : IDebugUIOptions { public string Title { get; set; } = "Debug"; public bool Draggable { get; set; } = true; + public bool Foldout { get; set; } = true; } } \ No newline at end of file diff --git a/src/DebugUI/Assets/DebugUI/Runtime/Elements/DebugWindow.cs b/src/DebugUI/Assets/DebugUI/Runtime/Elements/DebugWindow.cs index 8ca4f96..3662227 100644 --- a/src/DebugUI/Assets/DebugUI/Runtime/Elements/DebugWindow.cs +++ b/src/DebugUI/Assets/DebugUI/Runtime/Elements/DebugWindow.cs @@ -44,6 +44,12 @@ public bool Value } } + public bool Foldout + { + get => foldout.value; + set => foldout.value = value; + } + public string Text { get => text;