void ReadIntFromEditorPref(IntPref k)
        {
            string keyName = GetKeyNameInEditorPrefs(k);

            if (keyName != null)
            {
                int value = EditorPrefs.GetInt(keyName);
                SetIntNoEditorUpdate(k, value);
            }
        }
        /// <summary>
        /// Sets the value of an integer preference.
        /// </summary>
        /// <param name="k">The preference key.</param>
        /// <param name="value">The preference value.</param>
        public void SetInt(IntPref k, int value)
        {
            SetIntNoEditorUpdate(k, value);
            EditorPrefs.SetInt(GetKeyName(k), value);

            if (k.ObsoleteNames != null)
            {
                foreach (var obsoleteName in k.ObsoleteNames)
                {
                    EditorPrefs.DeleteKey(m_EditorPreferencesPrefix + obsoleteName);
                }
            }
        }
 /// <summary>
 /// Returns the value of an integer preference.
 /// </summary>
 /// <param name="k">The preference key.</param>
 /// <returns>The value of the preference, or 0 if the preference was never set.</returns>
 public int GetInt(IntPref k)
 {
     m_IntPrefs.TryGetValue(k, out var result);
     return(result);
 }
 /// <summary>
 /// Sets the value of an integer preference without updating <see cref="EditorPrefs"/>.
 /// Use this function to set a value that should not be persisted, like a default value.
 /// </summary>
 /// <param name="k">The preference key.</param>
 /// <param name="value">The preference value.</param>
 public void SetIntNoEditorUpdate(IntPref k, int value)
 {
     m_IntPrefs[k] = value;
 }