Language
Edit

CanvasProxyInteractor Class

Definition

A simple proxy interactor which will select and hover things on MRTK's behalf, for canvas input.

[UnityEngine.AddComponentMenu("MRTK/UX/Canvas Proxy Interactor")]
public class CanvasProxyInteractor : UnityEngine.XR.Interaction.Toolkit.XRBaseInteractor, MixedReality.Toolkit.IModeManagedInteractor, MixedReality.Toolkit.IProxyInteractor
[<UnityEngine.AddComponentMenu("MRTK/UX/Canvas Proxy Interactor")>]
type CanvasProxyInteractor = class
    inherit XRBaseInteractor
    interface IProxyInteractor
    interface IXRSelectInteractor
    interface IXRInteractor
    interface IXRHoverInteractor
    interface IModeManagedInteractor
Public Class CanvasProxyInteractor
Inherits XRBaseInteractor
Implements IModeManagedInteractor, IProxyInteractor
Inheritance
UnityEngine.XR.Interaction.Toolkit.XRBaseInteractor
CanvasProxyInteractor
Attributes
UnityEngine.AddComponentMenuAttribute
Implements
IModeManagedInteractor IProxyInteractor UnityEngine.XR.Interaction.Toolkit.IXRHoverInteractor UnityEngine.XR.Interaction.Toolkit.IXRInteractor UnityEngine.XR.Interaction.Toolkit.IXRSelectInteractor

Constructors

Name Description
CanvasProxyInteractor()

Fields

Name Description
manualSelectTarget

The last target selected using the StartSelect(IXRSelectInteractable) method. This value will be cleared when EndSelect(IXRSelectInteractable, Boolean) is called.

validTargets

The hash set containing a collection of valid interactable targets for this this interactor.

Properties

Name Description
isHoverActive UnityEngine.XR.Interaction.Toolkit.IXRHoverInteractor.isHoverActive
isSelectActive UnityEngine.XR.Interaction.Toolkit.IXRSelectInteractor.isSelectActive

Methods

Name Description
CanSelect(IXRSelectInteractable) UnityEngine.XR.Interaction.Toolkit.IXRSelectInteractor.CanSelect(UnityEngine.XR.Interaction.Toolkit.IXRSelectInteractable)
EndHover(IXRHoverInteractable)

End hovering the interactable. The interactable will receive OnHoverExiting and OnHoverExited events, and the proxy interactor will remove it from its list of valid targets.

EndSelect(IXRSelectInteractable, Boolean)

End selecting the interactable. The interactable will receive OnSelectExiting and OnSelectExited events. SuppressEvents will prevent StatefulInteractables from receiving click or toggle events.

GetModeManagedController()

Returns the GameObject that this interactor belongs to. This GameObject is governed by the interaction mode manager and is assigned an interaction mode. This GameObject represents the 'controller' that this interactor belongs to.

GetValidTargets(List<IXRInteractable>) UnityEngine.XR.Interaction.Toolkit.IXRInteractor.GetValidTargets(System.Collections.Generic.List{UnityEngine.XR.Interaction.Toolkit.IXRInteractable})
StartHover(IXRHoverInteractable, Vector3)

Begin hovering the interactable. The interactable will receive OnHoverEntering and OnHoverEntered events, and the proxy interactor will include it in its list of valid targets. Also includes the worldPosition of the pointer.

StartHover(IXRHoverInteractable)

Begin hovering the interactable. The interactable will receive OnHoverEntering and OnHoverEntered events, and the proxy interactor will include it in its list of valid targets.

StartSelect(IXRSelectInteractable, Vector3)

Begin selecting the interactable. The interactable will receive OnSelectEntering and OnSelectEntered events. Also includes the worldPosition of the pointer.

StartSelect(IXRSelectInteractable)

Begin selecting the interactable. The interactable will receive OnSelectEntering and OnSelectEntered events.

UpdateSelect(IXRSelectInteractable, Vector3)

Call to periodically update an in-progress selection. Typically used for drags; worldPosition specifies the world position of the pointer's drag.

Applies to