Browse Source

Merge pull request #701 from stevehalliwell/VariableEditorLabelBugFix

VariableEditor PropertyDrawers copy label before GetPropertyHeight to…
master
Steve Halliwell 7 years ago committed by GitHub
parent
commit
4a5b61040f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Assets/Fungus/Scripts/Editor/VariableEditor.cs

6
Assets/Fungus/Scripts/Editor/VariableEditor.cs

@ -209,13 +209,15 @@ namespace Fungus.EditorUtils
return; return;
} }
var origLabel = new GUIContent(label);
if (EditorGUI.GetPropertyHeight(valueProp, label) > EditorGUIUtility.singleLineHeight) if (EditorGUI.GetPropertyHeight(valueProp, label) > EditorGUIUtility.singleLineHeight)
{ {
DrawMultiLineProperty(position, label, referenceProp, valueProp, flowchart); DrawMultiLineProperty(position, origLabel, referenceProp, valueProp, flowchart);
} }
else else
{ {
DrawSingleLineProperty(position, label, referenceProp, valueProp, flowchart); DrawSingleLineProperty(position, origLabel, referenceProp, valueProp, flowchart);
} }
EditorGUI.EndProperty(); EditorGUI.EndProperty();

Loading…
Cancel
Save