docs.unity.cn
    Show / Hide Table of Contents

    Struct EditorPrefBoolFlags<T>

    Bool flag saved in EditorPref

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    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

    Implements
    IEquatable<T>.Equals(T)

    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

    Implements
    IEquatable<T>.Equals(T)

    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

    Extension Methods

    AnalyticsUtils.ToNestedColumn<T>(T, Boolean)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, Boolean)
    ReflectionUtils.Invoke(Object, String, Object[])
    ReflectionUtils.SetField(Object, String, Object)
    ReflectionUtils.GetField(Object, String)
    ReflectionUtils.GetFields(Object)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 08 September 2023