public static void Open() { if (window == null) { window = EditorWindow.GetWindow <InversionDependenciesGraph>(true, "Inversion Dependencies Graph", true); if (!EditorPrefs.GetBool("firstOpenInversionDependenciesGraph")) { int initWidth = 300; int initHeight = 600; int x = (Screen.currentResolution.width - initWidth) / 2; int y = (Screen.currentResolution.height - initHeight) / 2; window.position = new Rect(x, y, initWidth, initHeight); EditorPrefs.SetBool("firstOpenInversionDependenciesGraph", true); } } else { window.Analyze(); } }
void OnDestroy() { window = null; }