0.2.1: Fixed issue, where displaying drawer error resulted in an additional style warning
This commit is contained in:
parent
ffec2abdf4
commit
36a8310a01
|
|
@ -21,7 +21,13 @@ namespace Module.Inspector.Editor
|
||||||
if (result.draw != null)
|
if (result.draw != null)
|
||||||
{
|
{
|
||||||
if (!result.draw.drawer.Draw(position, result.draw.attribute, property, label, result))
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "com.module.inspector",
|
"name": "com.module.inspector",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"displayName": "Module.Inspector",
|
"displayName": "Module.Inspector",
|
||||||
"description": "Custom inspector with various useful property drawers",
|
"description": "Custom inspector with various useful property drawers",
|
||||||
"unity": "2019.2",
|
"unity": "2019.2",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue