Browse Source

Merge pull request #752 from stevehalliwell/CharacterContextMenuRenameBig

Character only sets self dirty if change detected
master
Steve Halliwell 5 years ago committed by GitHub
parent
commit
6f85a737b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Assets/Fungus/Scripts/Editor/CharacterEditor.cs

4
Assets/Fungus/Scripts/Editor/CharacterEditor.cs

@ -33,6 +33,7 @@ namespace Fungus.EditorUtils
serializedObject.Update(); serializedObject.Update();
Character t = target as Character; Character t = target as Character;
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(nameTextProp, new GUIContent("Name Text", "Name of the character display in the dialog")); EditorGUILayout.PropertyField(nameTextProp, new GUIContent("Name Text", "Name of the character display in the dialog"));
EditorGUILayout.PropertyField(nameColorProp, new GUIContent("Name Color", "Color of name text display in the dialog")); EditorGUILayout.PropertyField(nameColorProp, new GUIContent("Name Color", "Color of name text display in the dialog"));
@ -75,7 +76,8 @@ namespace Fungus.EditorUtils
EditorGUILayout.Separator(); EditorGUILayout.Separator();
EditorUtility.SetDirty(t); if(EditorGUI.EndChangeCheck())
EditorUtility.SetDirty(t);
serializedObject.ApplyModifiedProperties(); serializedObject.ApplyModifiedProperties();
} }

Loading…
Cancel
Save