UnityEditor.EditorPrefs.HasKey C# (CSharp) Method

HasKey() private method

private HasKey ( string key ) : bool
key string
return bool
        public static extern bool HasKey(string key);
        /// <summary>

Usage Example

示例#1
0
        internal static void ShowDetails(bool shouldReposition)
        {
            if (s_Window && s_Window.docked)
            {
                shouldReposition = false;
            }

            if (s_Window == null)
            {
                var wins = Resources.FindObjectsOfTypeAll <ProgressWindow>();
                if (wins.Length > 0)
                {
                    s_Window = wins[0];
                }
            }

            bool newWindowCreated = false;

            if (!s_Window)
            {
                s_Window         = CreateInstance <ProgressWindow>();
                newWindowCreated = true;

                // If it is the first time this window is opened, reposition.
                if (!EditorPrefs.HasKey(k_CheckWindowKeyName))
                {
                    shouldReposition = true;
                }
            }

            s_Window.Show();
            s_Window.Focus();

            if (newWindowCreated && shouldReposition)
            {
                var mainWindowRect = EditorGUIUtility.GetMainWindowPosition();
                var size           = new Vector2(k_WindowWidth, k_WindowHeight);
                s_Window.position = new Rect(mainWindowRect.xMax - k_WindowWidth - 6, mainWindowRect.yMax - k_WindowHeight - 50, size.x, size.y);
                s_Window.minSize  = new Vector2(k_WindowMinWidth, k_WindowMinHeight);
            }
        }
All Usage Examples Of UnityEditor.EditorPrefs::HasKey