1.8.1: Fixed issue with certain drawers using EditorGUI.PropertyField, which would invoke a second draw with the same attribute

This commit is contained in:
Anders Ejlersen 2023-04-21 18:44:44 +02:00
parent eb19150d98
commit b189ec8b97
8 changed files with 21 additions and 14 deletions

View file

@ -20,9 +20,11 @@ namespace Module.Inspector.Editor
var rect0 = new Rect(position.x, position.y, position.width - WIDTH, position.height);
var rect1 = new Rect(rect0.xMax, position.y, WIDTH, position.height);
EditorGUI.PropertyField(rect0, property, label);
string temp = EditorGUI.TextField(rect0, label, property.stringValue);
if (!temp.Equals(property.stringValue))
property.stringValue = temp;
if (GUI.Button(rect1, "Find"))
{
string path = EditorUtility.OpenFolderPanel("Folder", "Assets/", string.Empty);