private static void Init() { if (initilized) { return; } if (PlayerPrefs.HasKey(strKey)) { dontShowWeclomeMessageAgain = CommonUtil.ZeroOneToTrueFalseBool(PlayerPrefs.GetInt(strKey)); } if (dontShowWeclomeMessageAgain) { return; } window = (WelcomePopup)EditorWindow.GetWindow(typeof(WelcomePopup)); window.titleContent.text = "Welcome"; window.maxSize = size; window.maximized = true; window.position = new Rect((Screen.currentResolution.width - size.x) / 2, (Screen.currentResolution.height - size.y) / 2, size.x, size.y); window.Show(); window.Focus(); initilized = true; PlayerPrefs.SetInt(strKey, CommonUtil.TrueFalseBoolToZeroOne(true)); }
/// <summary> /// Determine whether the shape is locked or not. /// </summary> /// <returns><c>true</c> if is shape locked; otherwise, <c>false</c>.</returns> /// <param name="ID">The ID of the shape.</param> public static bool IsShapeLocked(int ID) { bool isLocked = true; string key = GetLockedStrKey(ID); if (PlayerPrefs.HasKey(key)) { isLocked = CommonUtil.ZeroOneToTrueFalseBool(PlayerPrefs.GetInt(key)); } return(isLocked); }