BaseReticleVisual Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A base class for Reticle Visuals. This class takes care of swapping reticle models by implementing UnityEngine.XR.Interaction.Toolkit.IXRCustomReticleProvider. Classes which derive from this class should provide behavior that is universal to that class of reticles, such as aligning a reticle with an interactor's pose.
[UnityEngine.AddComponentMenu("MRTK/Input/Base Reticle Visual")]
[UnityEngine.DisallowMultipleComponent]
public class BaseReticleVisual : UnityEngine.MonoBehaviour, UnityEngine.XR.Interaction.Toolkit.IXRCustomReticleProvider
[<UnityEngine.AddComponentMenu("MRTK/Input/Base Reticle Visual")>]
[<UnityEngine.DisallowMultipleComponent>]
type BaseReticleVisual = class
inherit MonoBehaviour
interface IXRCustomReticleProvider
Public Class BaseReticleVisual
Inherits MonoBehaviour
Implements IXRCustomReticleProvider
- Inheritance
-
UnityEngine.MonoBehaviourBaseReticleVisual
- Derived
- Attributes
-
UnityEngine.AddComponentMenuAttribute UnityEngine.DisallowMultipleComponentAttribute
- Implements
-
UnityEngine.XR.Interaction.Toolkit.IXRCustomReticleProvider
Constructors
| Name | Description |
|---|---|
| BaseReticleVisual() | |
Properties
| Name | Description |
|---|---|
| BaseReticle |
The reticle model to use when the interactable doesn't specify a custom one. |
| CustomReticle |
Staging area for custom reticles that interactors can attach to show unique visuals. |
| CustomReticleAttached |
Is there a custom reticle currently attached to this interactor? |
| Reticle |
The current reticle that the interactor is using. |
| ReticleRoot |
The root of the reticle visuals. |
| Visual |
Cached reference to the IReticleVisual component on Reticle. |
Methods
| Name | Description |
|---|---|
| AttachCustomReticle(GameObject) | UnityEngine.XR.Interaction.Toolkit.IXRCustomReticleProvider.AttachCustomReticle(UnityEngine.GameObject) |
| OnEnable() |
A Unity event function that is called when the script component has been enabled. |
| RemoveCustomReticle() | UnityEngine.XR.Interaction.Toolkit.IXRCustomReticleProvider.RemoveCustomReticle |