Class BaseInteractionEventArgs
Event data associated with an interaction event between an Interactor and Interactable.
Inherited Members
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 XRInteraction
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 XRInteraction
Examples
The following example demonstrates the implementation of the Hover
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
interactorObject
The Interactor associated with the interaction event.
Declaration
public IXRInteractor interactorObject { get; set; }
Property Value
Type | Description |
---|---|
IXRInteractor |