AutoPrefs.

AutoPrefs.Bool Class

Summary

An InspectorGadgets.AutoPrefs.AutoPref`1 which encapsulates a bool value stored in PlayerPrefs.
Assembly
InspectorGadgets.dll
Namespace
InspectorGadgets
Interfaces
Base Types
Derived Types
graph BT Type-->Base0["AutoPrefs.AutoPref<bool>"] Base0-->Base1["Object"] Type-.->Interface0["AutoPrefs.IAutoPref"] click Interface0 "/inspector-gadgets/api/InspectorGadgets/IAutoPref" Type["AutoPrefs.Bool"] class Type type-node Derived0["AutoPrefs.EditorBool"]-->Type click Derived0 "/inspector-gadgets/api/InspectorGadgets/EditorBool"

Syntax

public class AutoPrefs.Bool : AutoPrefs.AutoPref<bool>, AutoPrefs.IAutoPref

Constructors

Name Summary
Bool(string, bool, Action<bool>) Constructs a InspectorGadgets.AutoPrefs.Bool 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).

Methods

Name Value Summary
DoGUIField(Rect, GUIContent, GUIStyle) bool
[Editor-Only] Draws a GUI field for this pref and returns the value it is set to.
Invert() void
Toggles the value of this pref from false to true or vice versa.
Load() bool
Loads the value of this pref from PlayerPrefs.
Save() void
Saves the value of this pref to PlayerPrefs.

Operators

Name Value Summary
implicit operator AutoPrefs.Bool(string) AutoPrefs.Bool
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>