Struct EditorPrefBoolFlags<T>
Bool flag saved in EditorPref
Namespace: UnityEditor.Rendering
Syntax
public struct EditorPrefBoolFlags<T> : IEquatable<T>, IEquatable<EditorPrefBoolFlags<T>> where T : struct, IConvertible
Type Parameters
Name | Description |
---|---|
T | Underlying enum type |
Constructors
EditorPrefBoolFlags(String)
Constructor
Declaration
public EditorPrefBoolFlags(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | Name of the Key in EditorPrefs to save the value |
Properties
rawValue
The raw value
Declaration
public uint rawValue { get; set; }
Property Value
Type | Description |
---|---|
UInt32 |
value
The value as the underlying enum type used
Declaration
public T value { get; set; }
Property Value
Type | Description |
---|---|
T |
Methods
Equals(T)
Test if saved value is equal to the one given
Declaration
public bool Equals(T other)
Parameters
Type | Name | Description |
---|---|---|
T | other | Given value |
Returns
Type | Description |
---|---|
Boolean | True if value are the same |
Equals(EditorPrefBoolFlags<T>)
Test if this EditorPrefBoolFlags is the same than the given one
Declaration
public bool Equals(EditorPrefBoolFlags<T> other)
Parameters
Type | Name | Description |
---|---|---|
EditorPrefBoolFlags<T> | other | Given EditorPrefBoolFlags |
Returns
Type | Description |
---|---|
Boolean | True if they use the same value |
HasFlag(T)
Test if the given flags are set
Declaration
public bool HasFlag(T v)
Parameters
Type | Name | Description |
---|---|---|
T | v | Given flags |
Returns
Type | Description |
---|---|
Boolean | True: all the given flags are set |
SetFlag(T, Boolean)
Set or unset the flags
Declaration
public void SetFlag(T f, bool v)
Parameters
Type | Name | Description |
---|---|---|
T | f | Flags to edit |
Boolean | v | Boolean value to set to the given flags |
Operators
BitwiseAnd(EditorPrefBoolFlags<T>, T)
And operator between a EditorPrefBoolFlags and a value
Declaration
public static EditorPrefBoolFlags<T> operator &(EditorPrefBoolFlags<T> l, T r)
Parameters
Type | Name | Description |
---|---|---|
EditorPrefBoolFlags<T> | l | The EditorPrefBoolFlags |
T | r | The value |
Returns
Type | Description |
---|---|
EditorPrefBoolFlags<T> | A EditorPrefBoolFlags with AND operator performed |
BitwiseOr(EditorPrefBoolFlags<T>, T)
Or operator between a EditorPrefBoolFlags and a value
Declaration
public static EditorPrefBoolFlags<T> operator |(EditorPrefBoolFlags<T> l, T r)
Parameters
Type | Name | Description |
---|---|---|
EditorPrefBoolFlags<T> | l | The EditorPrefBoolFlags |
T | r | The value |
Returns
Type | Description |
---|---|
EditorPrefBoolFlags<T> | A EditorPrefBoolFlags with OR operator performed |
ExclusiveOr(EditorPrefBoolFlags<T>, T)
Xor operator between a EditorPrefBoolFlags and a value
Declaration
public static EditorPrefBoolFlags<T> operator ^(EditorPrefBoolFlags<T> l, T r)
Parameters
Type | Name | Description |
---|---|---|
EditorPrefBoolFlags<T> | l | The EditorPrefBoolFlags |
T | r | The value |
Returns
Type | Description |
---|---|
EditorPrefBoolFlags<T> | A EditorPrefBoolFlags with XOR operator performed |
Explicit(EditorPrefBoolFlags<T> to T)
Explicit conversion operator to the underlying type
Declaration
public static explicit operator T(EditorPrefBoolFlags<T> v)
Parameters
Type | Name | Description |
---|---|---|
EditorPrefBoolFlags<T> | v | The EditorPrefBoolFlags to convert |
Returns
Type | Description |
---|---|
T | The converted value |