docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Struct InteractionState

    Serializable struct to hold logical input state for a given interaction, such as for select.

    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 InteractionState
    Remarks

    Use of this class should be avoided outside of the context of playback and recording. Instead, use XRBaseInputInteractor.LogicalInputState when possible.

    Properties

    Name Description
    activatedThisFrame

    Whether the interaction state activated this frame.

    active

    Whether it is currently on.

    deactivatedThisFrame

    Whether the interaction state deactivated this frame.

    value

    The value of the interaction in this frame.

    Methods

    Name Description
    ResetFrameDependent()

    Resets the interaction states that are based on whether they occurred "this frame".

    SetFrameDependent(bool)

    Sets the interaction state that are based on whether they occurred "this frame".

    SetFrameState(bool)

    Sets the interaction state for this frame. This method should only be called once per frame.

    SetFrameState(bool, float)

    Sets the interaction state for this frame. This method should only be called once per frame.

    See Also

    XRControllerState
    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)