AutoPrefs.

AutoPrefs.EditorBool Class

Summary

[Editor-Only] An InspectorGadgets.AutoPrefs.AutoPref`1 which encapsulates a bool value stored in EditorPrefs.
Assembly
InspectorGadgets.dll
Namespace
InspectorGadgets
Interfaces
Base Types
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 sealed class AutoPrefs.EditorBool : AutoPrefs.Bool, AutoPrefs.IAutoPref

Constructors

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

Properties

Name Value Summary
DefaultStyle GUIStyle
[Editor-Only] Draws the default GUI style used by this pref if none is specified when calling InspectorGadgets.AutoPrefs.AutoPref`1.OnGUI(Rect,GUIContent,GUIStyle).
Inherited from AutoPrefs.Bool

Methods

Name Value Summary
DeletePref() void
Deletes the value of this pref from EditorPrefs and reverts to the default value.
DoGUIField(Rect, GUIContent, GUIStyle) bool
[Editor-Only] Draws a GUI field for this pref and returns the value it is set to.
Inherited from AutoPrefs.Bool
Invert() void
Toggles the value of this pref from false to true or vice versa.
Inherited from AutoPrefs.Bool
IsSaved() bool
Returns true if EditorPrefs currently contains a value for this pref.
Load() bool
Loads the value of this pref from EditorPrefs.
Save() void
Saves the value of this pref to 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>