|
@@ -1,10 +1,11 @@
|
|
|
using NRKernal;
|
|
|
+using SC.XR.Unity;
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
-public class XRRGBCamera : MonoBehaviour
|
|
|
+public class XRRGBCamera : SingletonMono<XRRGBCamera>
|
|
|
{
|
|
|
public Texture CaptureImage;
|
|
|
NRRGBCamTexture RGBCamTexture;
|
|
@@ -18,10 +19,10 @@ public class XRRGBCamera : MonoBehaviour
|
|
|
public void playCamera()
|
|
|
{
|
|
|
CaptureImage = RGBCamTexture.GetTexture();
|
|
|
- if(this.GetComponent<RawImage>()!=null)
|
|
|
+ if (this.GetComponent<RawImage>() != null)
|
|
|
{
|
|
|
this.GetComponent<RawImage>().texture = CaptureImage;
|
|
|
- this.GetComponent<RawImage>().transform.localEulerAngles = new Vector3(-180,0,0);
|
|
|
+ this.GetComponent<RawImage>().transform.localEulerAngles = new Vector3(-180, 0, 0);
|
|
|
}
|
|
|
RGBCamTexture.Play();
|
|
|
}
|