docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BaseInteractionEventArgs

    Event data associated with an interaction event between an Interactor and Interactable.

    Inheritance
    object
    BaseInteractionEventArgs
    ActivateEventArgs
    DeactivateEventArgs
    FocusEnterEventArgs
    FocusExitEventArgs
    HoverEnterEventArgs
    HoverExitEventArgs
    TeleportingEventArgs
    SelectEnterEventArgs
    SelectExitEventArgs
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public abstract class BaseInteractionEventArgs
    Remarks

    This class is currently used to define the event args for the interaction events supported by the XRInteractionManager.

    This abstract class can be used to define custom events that are based on an interaction between an IXRInteractor and an IXRInteractable. If the custom event needs to be executed through the XR Interaction Toolkit interaction system using XRInteractionManager, a custom extension of XRInteractionManager is be required.

    Examples

    The following example demonstrates the implementation of the HoverEnterEventArgs.

    public class HoverEnterEventArgs : BaseInteractionEventArgs
    {
        /// <summary>
        /// The Interactor associated with the interaction event.
        /// </summary>
        public new IXRHoverInteractor interactorObject
        {
            get => (IXRHoverInteractor)base.interactorObject;
            set => base.interactorObject = value;
        }
    
    /// <summary>
    /// The Interactable associated with the interaction event.
    /// </summary>
    public new IXRHoverInteractable interactableObject
    {
        get => (IXRHoverInteractable)base.interactableObject;
        set => base.interactableObject = value;
    }
    
    /// <summary>
    /// The Interaction Manager associated with the interaction event.
    /// </summary>
    public XRInteractionManager manager { get; set; }
    

    }

    Properties

    interactableObject

    The Interactable associated with the interaction event.

    Declaration
    public IXRInteractable interactableObject { get; set; }
    Property Value
    Type Description
    IXRInteractable
    See Also
    HoverEnterEventArgs
    HoverExitEventArgs
    SelectEnterEventArgs
    SelectExitEventArgs
    FocusEnterEventArgs
    FocusExitEventArgs
    ActivateEventArgs
    DeactivateEventArgs

    interactorObject

    The Interactor associated with the interaction event.

    Declaration
    public IXRInteractor interactorObject { get; set; }
    Property Value
    Type Description
    IXRInteractor
    See Also
    HoverEnterEventArgs
    HoverExitEventArgs
    SelectEnterEventArgs
    SelectExitEventArgs
    FocusEnterEventArgs
    FocusExitEventArgs
    ActivateEventArgs
    DeactivateEventArgs

    See Also

    HoverEnterEventArgs
    HoverExitEventArgs
    SelectEnterEventArgs
    SelectExitEventArgs
    FocusEnterEventArgs
    FocusExitEventArgs
    ActivateEventArgs
    DeactivateEventArgs
    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)