public void ResetLayout() { if (graph != null) { graph.layoutSettings.Reset(); layout = LayoutFactory.Create2ResizablePanelLayout(this); } if (OnResetLayout != null) { OnResetLayout(); } }
public override void OnEnable() { Profiler.BeginSample("[PW] GraphEditor Enabled"); base.OnEnable(); //provide the MacOS bool MacOS = SystemInfo.operatingSystem.Contains("Mac"); EditorApplication.playModeStateChanged += PlayModeChangeCallback; Undo.undoRedoPerformed += UndoRedoCallback; //clear event masks eventMasks.Clear(); LoadAssets(); layout = LayoutFactory.Create2ResizablePanelLayout(this); Profiler.EndSample(); }