0.2.1: Fixed issue, where displaying drawer error resulted in an additional style warning
This commit is contained in:
parent
ffec2abdf4
commit
36a8310a01
2 changed files with 8 additions and 2 deletions
|
|
@ -21,7 +21,13 @@ namespace Module.Inspector.Editor
|
|||
if (result.draw != null)
|
||||
{
|
||||
if (!result.draw.drawer.Draw(position, result.draw.attribute, property, label, result))
|
||||
EditorGUI.LabelField(position, label, result.draw.drawer.GetErrorMessage(property));
|
||||
{
|
||||
Color prevColor = GUI.color;
|
||||
GUI.color = Color.red;
|
||||
var errorContent = new GUIContent(result.draw.drawer.GetErrorMessage(property));
|
||||
EditorGUI.LabelField(position, label, errorContent);
|
||||
GUI.color = prevColor;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue