File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
org.mixedrealitytoolkit.input/Visualizers/PlatformHandVisualizer Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,9 @@ public class PlatformHandMeshVisualizer : HandMeshVisualizer
2525
2626#if MROPENXR_PRESENT && ( UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_ANDROID )
2727 private HandMeshTracker handMeshTracker ;
28- #endif
29-
3028 private Mesh neutralPoseMesh ;
3129 private bool initializedUVs = false ;
30+ #endif
3231
3332 private XRMeshSubsystem meshSubsystem = null ;
3433 private readonly List < MeshInfo > meshInfos = new List < MeshInfo > ( ) ;
@@ -40,11 +39,6 @@ protected override void OnEnable()
4039
4140 handRenderer . enabled = false ;
4241
43- if ( neutralPoseMesh == null )
44- {
45- neutralPoseMesh = new Mesh ( ) ;
46- }
47-
4842#if UNITY_OPENXR_PRESENT
4943 if ( UnityEngine . XR . OpenXR . OpenXRRuntime . IsExtensionEnabled ( "XR_ANDROID_hand_mesh" ) )
5044 {
@@ -65,6 +59,11 @@ protected override void OnEnable()
6559#if MROPENXR_PRESENT && ( UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_ANDROID )
6660 Debug . Log ( $ "Using XR_MSFT_hand_tracking_mesh for { HandNode } visualization.") ;
6761 handMeshTracker = HandNode == XRNode . LeftHand ? HandMeshTracker . Left : HandMeshTracker . Right ;
62+
63+ if ( neutralPoseMesh == null )
64+ {
65+ neutralPoseMesh = new Mesh ( ) ;
66+ }
6867#endif
6968 }
7069 else
You can’t perform that action at this time.
0 commit comments