Closed AtheosCode closed 6 years ago
when use panelType = (PanelType)RTEditorGUI.EnumPopup(panelType) in cutom node in Unity Play model
panelType = (PanelType)RTEditorGUI.EnumPopup(panelType)
And I change to EditorGUILayout.EnumPopup it is ok.
EditorGUILayout.EnumPopup
supplement: I think the problem is here, It retrurn a new GUIContent() every frame when Application isPlaying
public static System.Enum EnumPopup (GUIContent label, System.Enum selected) { #if UNITY_EDITOR if (!Application.isPlaying) return UnityEditor.EditorGUILayout.EnumPopup (label, selected); #endif label.text += ": " + selected.ToString (); GUILayout.Label (label); return selected; }
Yep seen that before but forgot to fix it, thanks:)
when use
panelType = (PanelType)RTEditorGUI.EnumPopup(panelType)
in cutom node in Unity Play modelAnd I change to
EditorGUILayout.EnumPopup
it is ok.supplement: I think the problem is here, It retrurn a new GUIContent() every frame when Application isPlaying