docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct EditorPrefBoolFlags<T>

    Bool flag saved in EditorPref

    Implements
    IEquatable<T>
    IEquatable<EditorPrefBoolFlags<T>>
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.Rendering
    Assembly: Unity.RenderPipelines.Core.Editor.dll
    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
    uint

    value

    The value as the underlying enum type used

    Declaration
    public T value { get; set; }
    Property Value
    Type Description
    T

    Methods

    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
    bool

    True if they use the same value

    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
    bool

    True if value are the same

    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
    bool

    True: all the given flags are set

    SetFlag(T, bool)

    Set or unset the flags

    Declaration
    public void SetFlag(T f, bool v)
    Parameters
    Type Name Description
    T f

    Flags to edit

    bool v

    Boolean value to set to the given flags

    Operators

    operator &(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

    operator |(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

    operator ^(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 operator T(EditorPrefBoolFlags<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

    Implements

    IEquatable<T>
    IEquatable<T>

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)