胡佳骏 1 year ago
parent
commit
588afd2be2
1 changed files with 10 additions and 0 deletions
  1. 10 0
      Samples~/SDK/XRRGBCamera.cs

+ 10 - 0
Samples~/SDK/XRRGBCamera.cs

@@ -67,6 +67,11 @@ public class XRRGBCamera : SingletonMono<XRRGBCamera>
                 this.GetComponent<RawImage>().texture = CaptureImage;
                 this.GetComponent<RawImage>().transform.localEulerAngles = new Vector3(0, 0, 0);
             }
+            if (this.GetComponent<MeshRenderer>() != null)
+            {
+                this.GetComponent<MeshRenderer>().material.mainTexture = CaptureImage;
+                this.GetComponent<MeshRenderer>().transform.localEulerAngles = new Vector3(0, 0, 0);
+            }
             Debug.Log("¿ªÆôÉãÏñÍ·");
 
         }
@@ -142,6 +147,11 @@ public class XRRGBCamera : SingletonMono<XRRGBCamera>
             this.GetComponent<RawImage>().texture = CaptureImage;
             this.GetComponent<RawImage>().transform.localEulerAngles = new Vector3(0, 0, 180);
         }
+        if (this.GetComponent<MeshRenderer>() != null)
+        {
+            this.GetComponent<MeshRenderer>().material.mainTexture = CaptureImage;
+            this.GetComponent<MeshRenderer>().transform.localEulerAngles = new Vector3(0, 0, 180);
+        }
 
     }