Class XRHandMeshController
A component that controls the visual representation for an XRHand in the scene. This component subscribes to events from an XRHandTrackingEvents component to enable and disable a mesh renderer when tracking is acquired or lost.
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Hands
Assembly: Unity.XR.Hands.dll
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.hands@1.5/api/UnityEngine.XR.Hands.XRHandMeshController.html")]
public class XRHandMeshController : MonoBehaviour
Properties
handIsTracked
Whether the hand for this visual is currently being tracked
Declaration
public bool handIsTracked { get; }
Property Value
Type | Description |
---|---|
bool |
handMeshRenderer
The renderer used to draw the hand mesh.
Declaration
public Renderer handMeshRenderer { get; set; }
Property Value
Type | Description |
---|---|
Renderer |
handTrackingEvents
The XRHandTrackingEvents component that will be the source of hand tracking events for this mesh controller.
Declaration
public XRHandTrackingEvents handTrackingEvents { get; set; }
Property Value
Type | Description |
---|---|
XRHandTrackingEvents |
hideMeshWhenTrackingIsLost
If enabled, the hand mesh renderer will be disabled when the hand tracking is lost.
Declaration
public bool hideMeshWhenTrackingIsLost { get; set; }
Property Value
Type | Description |
---|---|
bool |
showMeshWhenTrackingIsAcquired
If enabled, the hand mesh renderer will be enabled when the hand tracking is acquired.
Declaration
public bool showMeshWhenTrackingIsAcquired { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
OnDisable()
See MonoBehaviour.
Declaration
protected virtual void OnDisable()
OnEnable()
See MonoBehaviour.
Declaration
protected virtual void OnEnable()
Reset()
See MonoBehaviour.
Declaration
protected virtual void Reset()