胡佳骏 1 年之前
父節點
當前提交
588afd2be2
共有 1 個文件被更改,包括 10 次插入0 次删除
  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);
+        }
 
     }