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:
parent
b08d706e0d
commit
d397e3a208
@ -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 { }
|
||||
@ -51,6 +51,7 @@ namespace XNodeEditor {
|
||||
private void SetEnum(SerializedProperty property, int index) {
|
||||
property.enumValueIndex = index;
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
property.serializedObject.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user