diff --git a/Scripts/Editor/NodeEditorWindow.cs b/Scripts/Editor/NodeEditorWindow.cs index 535da52..5fa0fe8 100644 --- a/Scripts/Editor/NodeEditorWindow.cs +++ b/Scripts/Editor/NodeEditorWindow.cs @@ -8,9 +8,9 @@ using Object = UnityEngine.Object; namespace XNodeEditor { [InitializeOnLoad] public partial class NodeEditorWindow : EditorWindow,IHasCustomMenu { - - public bool Lock { get; private set; } - + + public bool Lock { get; set; } + /// /// Magic method which Unity detects automatically. /// @@ -18,7 +18,7 @@ namespace XNodeEditor { void ShowButton(Rect position) { Lock = GUI.Toggle(position, Lock, GUIContent.none, "IN LockButton"); } - + public void AddItemsToMenu(GenericMenu menu) { menu.AddItem(new GUIContent("Lock"), Lock, () => { @@ -46,7 +46,7 @@ namespace XNodeEditor { } } } - + public static NodeEditorWindow current; /// Stores node positions for all nodePorts. @@ -121,10 +121,10 @@ namespace XNodeEditor { graphEditor.OnWindowFocus(); if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); } - + dragThreshold = Math.Max(1f, Screen.width / 1000f); } - + void OnLostFocus() { if (graphEditor != null) graphEditor.OnWindowFocusLost(); } @@ -262,7 +262,7 @@ namespace XNodeEditor { w = EditorWindow.CreateInstance(); w.titleContent = new GUIContent("xNode"); } - + w.Show(true); w.Focus();