private static AssetHunterMainWindow initializeWindow() { m_IntialGUIColor = GUI.color; m_window = EditorWindow.GetWindow <AssetHunterMainWindow>(); m_window.Show(); loadEditorResources(); m_window.m_BuildLogExists = AssetHunterHelper.HasBuildLogAvaliable(); AssetHunterUpgradeWindow.Init(); return(m_window); }
private static void runShowUpdateInfoTest() { bool windowWasShown = EditorPrefs.GetInt(UpdateWindowWasShown) == 1; //Make sure we haven't chosen NOT to import if (windowWasShown) { return; } else { AssetHunterUpgradeWindow.Init(); } }
public static void Init() { bool hasKey = EditorPrefs.HasKey(AssetHunterUpgradeTester.AllowUpdateWindowPrefKey); bool windowAllowed = EditorPrefs.GetInt(AssetHunterUpgradeTester.AllowUpdateWindowPrefKey) == 1; if (hasKey && windowAllowed) { return; } EditorPrefs.SetInt(AssetHunterUpgradeTester.UpdateWindowWasShown, 1); int windowWidth = 500; int windowHeight = 300; Rect windowRect = new Rect(Screen.width * .5f - (windowWidth * .5f), Screen.height * .5f - (windowHeight * .5f), windowWidth, windowHeight); AssetHunterUpgradeWindow window = GetWindowWithRect <AssetHunterUpgradeWindow>(windowRect, true, "MAJOR UPGRADE AVALIABLE", true); window.initialized = true; }