protected static float DrawSlider(string label, string key, float value, float min, float max) { value = PlayerPrefsEx.GetFloat(key, value); float newValue = EditorGUILayout.Slider(label, value, min, max); if (newValue != value) { PlayerPrefsEx.SetFloat(key, newValue); } return(newValue); }