docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XRShaderKeywords

    Stores the enabled and disabled shader keywords for a material.

    Implements
    IEquatable<XRShaderKeywords>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    Syntax
    public readonly struct XRShaderKeywords : IEquatable<XRShaderKeywords>

    Constructors

    XRShaderKeywords(ReadOnlyList<string>, ReadOnlyList<string>)

    Constructor.

    Declaration
    public XRShaderKeywords(ReadOnlyList<string> enabledKeywords, ReadOnlyList<string> disabledKeywords)
    Parameters
    Type Name Description
    ReadOnlyList<string> enabledKeywords

    The enabled shader keywords.

    ReadOnlyList<string> disabledKeywords

    The disabled shader keywords.

    See Also
    https://docs.unity3d.com/Manual/shader-keywords.html

    Properties

    disabledKeywords

    The disabled shader keywords.

    Declaration
    public ReadOnlyList<string> disabledKeywords { get; }
    Property Value
    Type Description
    ReadOnlyList<string>
    See Also
    https://docs.unity3d.com/Manual/shader-keywords.html

    enabledKeywords

    The enabled shader keywords.

    Declaration
    public ReadOnlyList<string> enabledKeywords { get; }
    Property Value
    Type Description
    ReadOnlyList<string>
    See Also
    https://docs.unity3d.com/Manual/shader-keywords.html

    Methods

    Equals(object)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to obj. Otherwise, false.

    Overrides
    ValueType.Equals(object)
    See Also
    https://docs.unity3d.com/Manual/shader-keywords.html

    Equals(XRShaderKeywords)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(XRShaderKeywords other)
    Parameters
    Type Name Description
    XRShaderKeywords other

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to other. Otherwise, false.

    See Also
    https://docs.unity3d.com/Manual/shader-keywords.html

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    ValueType.GetHashCode()
    See Also
    https://docs.unity3d.com/Manual/shader-keywords.html

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The string.

    Overrides
    ValueType.ToString()
    See Also
    https://docs.unity3d.com/Manual/shader-keywords.html

    Operators

    operator ==(XRShaderKeywords, XRShaderKeywords)

    Tests for equality. Equivalent to Equals(XRShaderKeywords).

    Declaration
    public static bool operator ==(XRShaderKeywords lhs, XRShaderKeywords rhs)
    Parameters
    Type Name Description
    XRShaderKeywords lhs

    The left-hand side of the comparison.

    XRShaderKeywords rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    bool

    true if lhs is equal to rhs. Otherwise, false.

    See Also
    https://docs.unity3d.com/Manual/shader-keywords.html

    operator !=(XRShaderKeywords, XRShaderKeywords)

    Tests for inequality. Equivalent to !Equals(XRShaderKeywords).

    Declaration
    public static bool operator !=(XRShaderKeywords lhs, XRShaderKeywords rhs)
    Parameters
    Type Name Description
    XRShaderKeywords lhs

    The left-hand side of the comparison.

    XRShaderKeywords rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    bool

    true if lhs is equal to rhs. Otherwise, false.

    See Also
    https://docs.unity3d.com/Manual/shader-keywords.html

    Implements

    IEquatable<T>

    See Also

    https://docs.unity3d.com/Manual/shader-keywords.html
    In This Article
    Back to top
    Copyright © 2025 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)