Add support for pasting hex color values into Color properties in Editor
This commit is contained in:
@@ -619,6 +619,13 @@ namespace FlaxEditor.CustomEditors
|
||||
JsonSerializer.ParseID(text, out var id);
|
||||
obj = FlaxEngine.Object.Find<FlaxEngine.Object>(ref id);
|
||||
}
|
||||
else if (Color.TryParseHex(text, out var color))
|
||||
{
|
||||
// Hex color
|
||||
obj = color;
|
||||
if (Values.Type.Type == typeof(Color32))
|
||||
obj = (Color32)color;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Default
|
||||
|
||||
Reference in New Issue
Block a user