Fix log spam from TypeEditor if type is missing

This commit is contained in:
Wojtek Figat
2023-08-17 15:26:50 +02:00
parent c18625e017
commit 77f7d55f5a

View File

@@ -491,11 +491,17 @@ namespace FlaxEditor.CustomEditors.Editors
if (!HasDifferentValues && Values[0] is string asTypename && if (!HasDifferentValues && Values[0] is string asTypename &&
!string.Equals(asTypename, _lastTypeNameError, StringComparison.Ordinal)) !string.Equals(asTypename, _lastTypeNameError, StringComparison.Ordinal))
{
try
{ {
_element.CustomControl.Value = TypeUtils.GetType(asTypename); _element.CustomControl.Value = TypeUtils.GetType(asTypename);
}
finally
{
if (_element.CustomControl.Value == null && asTypename.Length != 0) if (_element.CustomControl.Value == null && asTypename.Length != 0)
_lastTypeNameError = asTypename; _lastTypeNameError = asTypename;
} }
} }
} }
} }
}