Edit

Share via


IMixedRealityRaycastProvider Interface

Definition

Interface to handle raycasts into the scene. Used by FocusProvider to perform ray and sphere cast queries for pointers.

public interface class IMixedRealityRaycastProvider : IDisposable, Microsoft::MixedReality::Toolkit::IMixedRealityService
public interface IMixedRealityRaycastProvider : IDisposable, Microsoft.MixedReality.Toolkit.IMixedRealityService
type IMixedRealityRaycastProvider = interface
    interface IMixedRealityService
    interface IDisposable
Public Interface IMixedRealityRaycastProvider
Implements IDisposable, IMixedRealityService
Derived
Implements

Remarks

Implementations of IMixedRealityRaycastProvider would likely use Unity's physics system to get hit results from Colliders. However, in a custom implementation, the raycast does not have to rely only on Unity-based Colliders to provide hit results, e.g. a GameObject may use a different mechanism for raycasting, and with a custom implementation, it could be included in the hit result.

Properties

ConfigurationProfile

The configuration profile for the service.

(Inherited from IMixedRealityService)
Name

Optional Priority attribute if multiple services of the same type are required, enables targeting a service for action.

(Inherited from IMixedRealityService)
Priority

Optional Priority to reorder registered managers based on their respective priority, reduces the risk of race conditions by prioritizing the order in which managers are evaluated.

(Inherited from IMixedRealityService)

Methods

Destroy()

Optional Destroy function to perform cleanup of the service before the Mixed Reality Toolkit is destroyed.

(Inherited from IMixedRealityService)
Disable()

Optional Disable function to pause the service.

(Inherited from IMixedRealityService)
Enable()

Optional Enable function to enable / re-enable the service.

(Inherited from IMixedRealityService)
GraphicsRaycast(EventSystem, PointerEventData, LayerMask[])

Performs a graphics raycast against the specified layerMasks.

Initialize()

The initialize function is used to setup the service once created. This method is called once all services have been registered in the Mixed Reality Toolkit.

(Inherited from IMixedRealityService)
LateUpdate()

Optional LateUpdate function to that is called after Update has been called on all services.

(Inherited from IMixedRealityService)
Raycast(RayStep, LayerMask[], Boolean, MixedRealityRaycastHit)

Performs a raycast using the specified RayStep.

Reset()

Optional Reset function to perform that will Reset the service, for example, whenever there is a profile change.

(Inherited from IMixedRealityService)
SphereCast(RayStep, Single, LayerMask[], Boolean, MixedRealityRaycastHit)

Performs a sphere cast with the specified RayStep and radius.

Update()

Optional Update function to perform per-frame updates of the service.

(Inherited from IMixedRealityService)

Applies to