docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Struct InteractionLayerMask

    Specifies Interaction Layers to use in XR interactions.

    Implements
    ISerializationCallbackReceiver
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Assembly: solution.dll
    Syntax
    [Serializable]
    public struct InteractionLayerMask : ISerializationCallbackReceiver

    Properties

    Name Description
    value

    Converts an interaction layer mask value to an integer value.

    Methods

    Name Description
    GetMask(params string[])

    Given a set of Interaction Layer names, returns the equivalent mask for all of them.

    LayerToName(int)

    Given a layer number, returns the name of the Interaction Layer as defined in either a Builtin or a User Layer.

    NameToLayer(string)

    Given an Interaction Layer name, returns the index as defined by either a Builtin or a User Layer.

    OnAfterDeserialize()

    See ISerializationCallbackReceiver.

    OnBeforeSerialize()

    See ISerializationCallbackReceiver.

    Operators

    Name Description
    implicit operator InteractionLayerMask(int)

    Implicitly converts an integer to an InteractionLayerMask.

    implicit operator int(InteractionLayerMask)

    Implicitly converts an InteractionLayerMask to an integer.

    In This Article
    Back to top
    Copyright © 2023 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)