AutoPrefs.

AutoPrefs.EditorInt Class

Summary

[Editor-Only] An InspectorGadgets.AutoPrefs.AutoPref`1 which encapsulates an int value stored in UnityEditor.EditorPrefs.
graph BT Type-->Base0["AutoPrefs.Int"] click Base0 "/inspector-gadgets/api/InspectorGadgets/Int" Base0-->Base1["AutoPrefs.AutoPref<int>"] Base1-->Base2["Object"] Type-.->Interface0["AutoPrefs.IAutoPref"] click Interface0 "/inspector-gadgets/api/InspectorGadgets/IAutoPref" Type["AutoPrefs.EditorInt"] class Type type-node Derived0["ModifierKeysPref"]-->Type click Derived0 "/inspector-gadgets/api/InspectorGadgets.Editor/ModifierKeysPref"

Syntax

public class AutoPrefs.EditorInt : AutoPrefs.Int, AutoPrefs.IAutoPref

Constructors

Name Summary
EditorInt(string, int, Action<int>) Constructs an InspectorGadgets.Editor.AutoPrefs.EditorInt 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() int
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.EditorInt(string) AutoPrefs.EditorInt
implicit operator AutoPrefs.Int(string) AutoPrefs.Int
Inherited from AutoPrefs.Int
implicit operator int(AutoPrefs.AutoPref<int>) int
Inherited from AutoPrefs.AutoPref<int>
operator !=(AutoPrefs.AutoPref<int>, int) bool
Inherited from AutoPrefs.AutoPref<int>
operator <(AutoPrefs.EditorInt, int) bool
operator <(AutoPrefs.Int, int) bool
Inherited from AutoPrefs.Int
operator ==(AutoPrefs.AutoPref<int>, int) bool
Inherited from AutoPrefs.AutoPref<int>
operator >(AutoPrefs.EditorInt, int) bool
operator >(AutoPrefs.Int, int) bool
Inherited from AutoPrefs.Int

Extension Methods

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