Draws a dropdown value even if the value is invalid

This commit is contained in:
VladV 2023-04-05 21:24:19 +04:00
parent 6881e0fe00
commit ae735beb2e

View File

@ -45,7 +45,7 @@ namespace TriInspector.Elements
_currentValue = _property.Value;
_currentText = _valuesGetter.Invoke(_property)
.FirstOrDefault(it => _property.Comparer.Equals(it.Value, _property.Value))
?.Text ?? "";
?.Text ?? (_property.Value?.ToString() ?? string.Empty);
}
var controlId = GUIUtility.GetControlID(FocusType.Passive);