Browse Source

Merge branch 'master' into XRSDK_A01

胡佳骏 1 year ago
parent
commit
86f0fdf813
1 changed files with 14 additions and 2 deletions
  1. 14 2
      Samples~/SDK/AllMoveEvent.cs

+ 14 - 2
Samples~/SDK/AllMoveEvent.cs

@@ -34,6 +34,10 @@ public class AllMoveEvent : MonoBehaviour
             ManipulationHandler m = obj.GetComponent<ManipulationHandler>();
             if (m != null)
             {
+                if (!m.enabled)
+                {
+                    return;
+                }
                 if (!m.isParentDrag && !obj.name.Contains("Root") && !obj.name.Contains("BoundingBox"))
                 {
                     m.OnPointerUp(part.inputDataBase.SCPointEventData);
@@ -62,9 +66,13 @@ public class AllMoveEvent : MonoBehaviour
         if (obj)
         {
             ManipulationHandler m = obj.GetComponent<ManipulationHandler>();
-            if (m != null)
+                if (m != null)
             {
-                if (!m.isParentDrag && !obj.name.Contains("Root") && !obj.name.Contains("BoundingBox"))
+                if (!m.enabled)
+                {
+                    return;
+                }
+                    if (!m.isParentDrag && !obj.name.Contains("Root") && !obj.name.Contains("BoundingBox"))
                 {
                     m.OnPointerDown(part.inputDataBase.SCPointEventData);
                     pz = obj;
@@ -96,6 +104,10 @@ public class AllMoveEvent : MonoBehaviour
             ManipulationHandler m = obj.GetComponent<ManipulationHandler>();
             if (m != null && !obj.name.Contains("Root") && !obj.name.Contains("BoundingBox"))
             {
+                if (!m.enabled)
+                {
+                    return;
+                }
                 if (!m.isParentDrag)
                     m.OnDrag(part.inputDataBase.SCPointEventData);
             }