Skip to content

Commit f533118

Browse files
committed
Update: sandbox project
1 parent f291bf2 commit f533118

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

sandbox/DebugUI.Sandbox/Assets/Sandbox/DebugUISandbox/DebugUISandbox.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
using System;
12
using UnityEngine;
23

34
namespace DebugUI.Sandbox
45
{
6+
public enum EnumExample
7+
{
8+
Alpha,
9+
Beta,
10+
Gamma
11+
}
12+
513
public sealed class DebugUISandbox : DebugUIBuilderBase
614
{
715
[Header("Fields")]
@@ -14,6 +22,7 @@ public sealed class DebugUISandbox : DebugUIBuilderBase
1422
[SerializeField] Vector2Int vector2IntValue;
1523
[SerializeField] Vector3Int vector3IntValue;
1624
[SerializeField] Bounds boundsValue;
25+
[SerializeField] EnumExample enumValue;
1726

1827
[Header("Slider")]
1928
[SerializeField, Range(0f, 10f)] float sliderValue;
@@ -69,6 +78,7 @@ protected override void Configure(IDebugUIBuilder builder)
6978
builder.AddField("Vector2Int", () => vector2IntValue, x => vector2IntValue = x);
7079
builder.AddField("Vector3Int", () => vector3IntValue, x => vector3IntValue = x);
7180
builder.AddField("Bounds", () => boundsValue, x => boundsValue = x);
81+
builder.AddField("Enum", () => enumValue, x => enumValue = x);
7282
});
7383

7484
builder.AddFoldout("Sliders", builder =>

sandbox/DebugUI.Sandbox/Assets/Sandbox/UXML/UXMLSandbox.uxml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<ui:ProgressBar value="22" title="my-progress" />
1010
<DebugUI.UIElements.FillSlider label="Slider" />
1111
<ui:Vector3Field label="Vec3 Field" />
12+
<ui:EnumField label="Enum" type="UnityEngine.TextAlignment, UnityEngine.TextRenderingModule" value="Center" />
1213
<ui:Foldout text="Foldout" />
1314
</DebugUI.UIElements.DebugWindow>
1415
</ui:UXML>

0 commit comments

Comments
 (0)