AutoPrefs.

AutoPrefs.EditorBool Class

Summary

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

Syntax

public class AutoPrefs.EditorBool : AutoPrefs.Bool, AutoPrefs.IAutoPref

Constructors

Name Summary
EditorBool(string, bool, Action<bool>) Constructs an InspectorGadgets.Editor.AutoPrefs.EditorBool 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.
Invert() void
Toggles the value of this pref from false to true or vice versa.
Inherited from AutoPrefs.Bool
IsSaved() bool
Returns true if UnityEditor.EditorPrefs currently contains a value for this pref.
Load() bool
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.Bool(string) AutoPrefs.Bool
Inherited from AutoPrefs.Bool
implicit operator AutoPrefs.EditorBool(string) AutoPrefs.EditorBool
implicit operator bool(AutoPrefs.AutoPref<bool>) bool
Inherited from AutoPrefs.AutoPref<bool>
operator !=(AutoPrefs.AutoPref<bool>, bool) bool
Inherited from AutoPrefs.AutoPref<bool>
operator ==(AutoPrefs.AutoPref<bool>, bool) bool
Inherited from AutoPrefs.AutoPref<bool>

Extension Methods

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