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 dd7739f95e
commit 7aa4ae1782

View File

@@ -650,7 +650,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;