AutoPrefs.

AutoPrefs.EditorFloat Class

Summary

[Editor-Only] An InspectorGadgets.AutoPrefs.AutoPref`1 which encapsulates a System.Single value stored in UnityEditor.EditorPrefs.
graph BT Type-->Base0["AutoPrefs.Float"] click Base0 "/inspector-gadgets/api/InspectorGadgets/Float" Base0-->Base1["AutoPrefs.AutoPref<float>"] Base1-->Base2["Object"] Type-.->Interface0["AutoPrefs.IAutoPref"] click Interface0 "/inspector-gadgets/api/InspectorGadgets/IAutoPref" Type["AutoPrefs.EditorFloat"] class Type type-node

Syntax

public class AutoPrefs.EditorFloat : AutoPrefs.Float, AutoPrefs.IAutoPref

Constructors

Name Summary
EditorFloat(string, float, Action<float>) Constructs an InspectorGadgets.Editor.AutoPrefs.EditorFloat pref with the specified `key` and `defaultValue`.

Methods

Name Value Summary
DeletePref() void
Deletes the value of this pref from UnityEditor.EditorPrefs and reverts to the default value.
IsSaved() bool
Returns true if UnityEditor.EditorPrefs currently contains a value for this pref.
Load() float
Loads the value of this pref from UnityEditor.EditorPrefs.
Save() void
Saves the value of this pref to UnityEditor.EditorPrefs.

Operators

Name Value Summary
implicit operator AutoPrefs.EditorFloat(string) AutoPrefs.EditorFloat
implicit operator AutoPrefs.Float(string) AutoPrefs.Float
Inherited from AutoPrefs.Float
implicit operator float(AutoPrefs.AutoPref<float>) float
Inherited from AutoPrefs.AutoPref<float>
operator !=(AutoPrefs.AutoPref<float>, float) bool
Inherited from AutoPrefs.AutoPref<float>
operator <(AutoPrefs.EditorFloat, float) bool
operator <(AutoPrefs.Float, float) bool
Inherited from AutoPrefs.Float
operator ==(AutoPrefs.AutoPref<float>, float) bool
Inherited from AutoPrefs.AutoPref<float>
operator >(AutoPrefs.EditorFloat, float) bool
operator >(AutoPrefs.Float, float) bool
Inherited from AutoPrefs.Float

Extension Methods

Name Value Summary
DoGUI(GUIContent) bool
Draws a GUI field for an InspectorGadgets.AutoPrefs.Float.
DoGUI<float>(GUIContent, AutoPrefs.GUIFieldMethod<float>) bool
[Editor-Only] Draws GUI controls for this pref and returns true if the value was changed.
DoGUI<float>(GUIContent, GUIStyle, AutoPrefs.GUIFieldMethod<float>) bool
[Editor-Only] Draws GUI controls for this pref and returns true if the value was changed.
DoGUI<float>(Rect, GUIContent, GUIStyle, AutoPrefs.GUIFieldMethod<float>) bool
[Editor-Only] Draws GUI controls for this pref and returns true if the value was changed.