BoolPref Class

Summary

[Editor-Only] A simple wrapper around EditorPrefs to get and set a bool.

If you are interested in a more comprehensive pref wrapper that supports more types, you should check out Inspector Gadgets.
Assembly
UltEvents.dll
Namespace
UltEvents.Editor
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["BoolPref"] class Type type-node

Syntax

public sealed class BoolPref

Constructors

Name Summary
BoolPref(string, bool, Action) Creates a new UltEvents.Editor.BoolPref.

Fields

Name Constant Value Summary
AutoHideFooter
Various settings.
static
AutoOpenMenu
Various settings.
static
ContextMenuStyle
Various settings.
static
DefaultValue
The starting value to use for this pref if none was previously saved.
GroupMethodOverloads
Various settings.
static
GroupNonPublicMethods
Various settings.
static
Key
The identifier with which this pref will be saved.
Label
The text that will be displayed for this item in a context menu.
OnChanged
Called when the value is changed.
ShowFullTypeNames
Various settings.
static
ShowNonPublicMethods
Various settings.
static
ShowStaticMethods
Various settings.
static
SubMenuForEachBaseType
Various settings.
static
UseIndentation
Various settings.
static

Properties

Name Value Summary
Value bool
The current value of this pref.

Methods

Name Value Summary
AddDisplayOptions(GenericMenu) void
Adds menu items to toggle all prefs.
static
AddDisplayOptions(PickerMenu) void
Adds menu items to toggle all prefs.
static
AddToMenu(GenericMenu) void
Adds a menu item to toggle this pref.
AddToMenu(PickerMenu) void
Adds a menu item to toggle this pref.

Operators

Name Value Summary
implicit operator bool(BoolPref) bool