1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-02-06 15:24:55 +08:00

Improved NodeEnumDrawer serialization

This commit is contained in:
Thor Brigsted 2019-01-10 19:54:11 +01:00
parent b08d706e0d
commit d397e3a208
2 changed files with 2 additions and 0 deletions

View File

@ -1,4 +1,5 @@
using UnityEngine;
/// <summary> Draw enums correctly within nodes. Without it, enums show up at the wrong positions. </summary>
/// <remarks> Enums with this attribute are not detected by EditorGui.ChangeCheck due to waiting before executing </remarks>
public class NodeEnumAttribute : PropertyAttribute { }

View File

@ -51,6 +51,7 @@ namespace XNodeEditor {
private void SetEnum(SerializedProperty property, int index) {
property.enumValueIndex = index;
property.serializedObject.ApplyModifiedProperties();
property.serializedObject.Update();
}
}
}