docs.unity3d.com
    Show / Hide Table of Contents

    Struct InteractionState

    InteractionState type to hold current state for a given interaction.

    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    public struct InteractionState

    Properties

    activatedThisFrame

    Whether the interaction state was activated this frame.

    Declaration
    public bool activatedThisFrame { get; set; }
    Property Value
    Type Description
    Boolean

    active

    Whether it is currently on.

    Declaration
    public bool active { get; set; }
    Property Value
    Type Description
    Boolean

    deactivatedThisFrame

    Whether the interaction state was deactivated this frame.

    Declaration
    public bool deactivatedThisFrame { get; set; }
    Property Value
    Type Description
    Boolean

    deActivatedThisFrame

    Whether the interaction state was deactivated this frame.

    Declaration
    public bool deActivatedThisFrame { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    Reset()

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

    Declaration
    public void Reset()

    ResetFrameDependent()

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

    Declaration
    public void ResetFrameDependent()
    See Also
    activatedThisFrame
    deactivatedThisFrame

    SetFrameState(Boolean)

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

    Declaration
    public void SetFrameState(bool isActive)
    Parameters
    Type Name Description
    Boolean isActive

    Whether the state is active (in other words, pressed).

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023