Skip to content

Commit c7abe57

Browse files
committed
Mark the hand mesh as dynamic
1 parent db3b57b commit c7abe57

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

org.mixedrealitytoolkit.input/Visualizers/PlatformHandVisualizer/PlatformHandMeshVisualizer.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ protected override void OnEnable()
5959
{
6060
Debug.Log($"Using XR_ANDROID_hand_mesh for {HandNode} visualization.");
6161
meshSubsystem = subsystem;
62+
63+
// Since the hand mesh is likely to change every frame, we
64+
// "optimize mesh for frequent updates" by marking it dynamic
65+
meshFilter.mesh.MarkDynamic();
66+
6267
break;
6368
}
6469
}
@@ -69,6 +74,10 @@ protected override void OnEnable()
6974
Debug.Log($"Using XR_MSFT_hand_tracking_mesh for {HandNode} visualization.");
7075
handMeshTracker = HandNode == XRNode.LeftHand ? HandMeshTracker.Left : HandMeshTracker.Right;
7176

77+
// Since the hand mesh is likely to change every frame, we
78+
// "optimize mesh for frequent updates" by marking it dynamic
79+
meshFilter.mesh.MarkDynamic();
80+
7281
if (neutralPoseMesh == null)
7382
{
7483
neutralPoseMesh = new Mesh();

0 commit comments

Comments
 (0)