Fix assigning null values into value types in Custom Editor

Resets back to previous value instead of setting the editor value to
empty.
This commit is contained in:
2024-03-16 14:10:57 +02:00
parent 3a665199e7
commit c8e893d2ec

View File

@@ -663,7 +663,7 @@ namespace FlaxEditor.CustomEditors
}
}
if (obj == null || Values.Type.IsInstanceOfType(obj))
if ((obj == null && !Values.Type.IsValueType) || Values.Type.IsInstanceOfType(obj))
{
result = obj;
return true;