AutoPrefs.

AutoPrefs.Bool Class

Summary

An InspectorGadgets.AutoPrefs.AutoPref`1 which encapsulates a bool value stored in UnityEngine.PlayerPrefs.
Assembly
Kybernetik.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.Editor/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`.

Methods

Name Value Summary
Invert() void
Toggles the value of this pref from false to true or vice versa.
Load() bool
Loads the value of this pref from UnityEngine.PlayerPrefs.
Save() void
Saves the value of this pref to UnityEngine.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>

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.