Summary
[Editor-Only]
A simple wrapper around
UnityEditor.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 - Auto Prefs.
- Assembly
- Animancer
.dll - Namespace
- Animancer
.Editor - Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type["BoolPref"]
class Type type-node
Syntax
public class BoolPref
Constructors
Name | Summary |
---|---|
BoolPref |
Creates a new Animancer.Editor.BoolPref . |
BoolPref |
Creates a new Animancer.Editor.BoolPref . |
Fields
Name | Constant Value | Summary |
---|---|---|
DefaultValue |
The starting value to use for this pref if none was previously saved.
|
|
Key |
The identifier with which this pref will be saved.
|
|
KeyPrefix | Animancer/ |
The prefix which is automatically added before the
Animancer.Editor.BoolPref.Key .static
|
MenuItem |
The label to use when adding a function to toggle this pref to a menu.
|
Properties
Name | Value | Summary |
---|---|---|
Value | bool |
The current value of this pref.
|
Methods
Name | Value | Summary |
---|---|---|
AddToggleFunction |
void |
Adds a menu function to toggle the
Animancer.Editor.BoolPref.Value of this pref. |
ToString |
string |
Returns a string containing the
Animancer.Editor.BoolPref.Key and Animancer.Editor.BoolPref.Value . |
Operators
Name | Value | Summary |
---|---|---|
implicit operator bool |
bool |