Skip to content

Commit 58c9d46

Browse files
committed
https://github.com/annulusgames/LitMotion/pull/244
[LitMotionAnimation] Make color picker use HDR-compatible GUI annulusgames#244
1 parent 3951059 commit 58c9d46

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/LitMotion/Assets/LitMotion/Editor/SerializableMotionSettingsDrawer.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
4747
group.Add(PropertyFieldHelper.CreateFixedStringField(property.FindPropertyRelative("startValue"), FixedString4096Bytes.UTF8MaxLengthInBytes));
4848
group.Add(PropertyFieldHelper.CreateFixedStringField(property.FindPropertyRelative("endValue"), FixedString4096Bytes.UTF8MaxLengthInBytes));
4949
}
50+
else if (valueType == typeof(UnityEngine.Color))
51+
{
52+
var start_value = new ColorField("Start Value") { hdr = true, showAlpha = true };
53+
start_value.BindProperty(property.FindPropertyRelative("startValue"));
54+
var end_value = new ColorField("End Value") { hdr = true, showAlpha = true };
55+
end_value.BindProperty(property.FindPropertyRelative("endValue"));
56+
group.Add(start_value);
57+
group.Add(end_value);
58+
}
5059
else
5160
{
5261
AddPropertyField(group, property, "startValue");

0 commit comments

Comments
 (0)