Edit

Share via


ControllerFinder Class

Definition

ControllerFinder is a base class providing simple event handling for getting/releasing MotionController Transforms.

public ref class ControllerFinder abstract : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Input::IMixedRealitySourceStateHandler, UnityEngine::EventSystems::IEventSystemHandler
public abstract class ControllerFinder : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.Input.IMixedRealitySourceStateHandler, UnityEngine.EventSystems.IEventSystemHandler
type ControllerFinder = class
    inherit MonoBehaviour
    interface IMixedRealitySourceStateHandler
    interface IEventSystemHandler
Public MustInherit Class ControllerFinder
Inherits MonoBehaviour
Implements IEventSystemHandler, IMixedRealitySourceStateHandler
Inheritance
UnityEngine.MonoBehaviour
ControllerFinder
Implements
IMixedRealitySourceStateHandler UnityEngine.EventSystems.IEventSystemHandler

Constructors

ControllerFinder()

Fields

ControllerTransform

The Transform of the currently found controller.

Properties

Handedness

The handedness of the controller that should be found.

Methods

AddControllerTransform(IMixedRealityController)

Starts to track the passed in controller's transform, assuming it meets the previously set handedness criteria.

OnControllerFound()

Override this method to act when the correct controller is actually found. This provides similar functionality to overriding AddControllerTransform, without the overhead of needing to check that handedness matches.

OnControllerLost()

Override this method to act when the correct controller is actually lost. This provides similar functionality to overriding AddControllerTransform, without the overhead of needing to check that handedness matches.

OnDisable()
OnEnable()
OnSourceDetected(SourceStateEventData)
OnSourceLost(SourceStateEventData)
RefreshControllerTransform()

Remove whichever controller is currently tracked, if any, and try to add a new one based on existing sources.

RemoveControllerTransform()

Remove whichever controller is currently tracked, if any.

TryAndAddControllerTransform()

Looks to see if the controller model already exists and registers it if so.

Applies to