/// <summary> /// Initialized the camera /// </summary> public void InitCamera() { if (mWebCamImpl == null) { // in play mode, do not pause when focus is lost Application.runInBackground = true; Camera arCamera = gameObject.GetComponent <Camera>(); mBackgroundCameraInstance = Instantiate(BackgroundCameraPrefab) as Camera; mWebCamImpl = new WebCamImpl(arCamera, mBackgroundCameraInstance, RenderTextureLayer, mDeviceNameSetInEditor, mFlipHorizontally); } }
public void InitCamera() { if (this.mWebCamImpl == null) { Application.runInBackground = true; Camera component = base.gameObject.GetComponent <Camera>(); if (this.BackgroundCameraPrefab != null) { this.mBackgroundCameraInstance = UnityEngine.Object.Instantiate(this.BackgroundCameraPrefab) as Camera; if ((KeepAliveAbstractBehaviour.Instance != null) && KeepAliveAbstractBehaviour.Instance.KeepARCameraAlive) { UnityEngine.Object.DontDestroyOnLoad(this.mBackgroundCameraInstance.gameObject); } } this.mWebCamImpl = new WebCamImpl(component, this.mBackgroundCameraInstance, this.RenderTextureLayer, this.mDeviceNameSetInEditor, this.mFlipHorizontally); } }
private int InitCameraDevice(int camera) { int rslt = 0; try { WebCamBehaviour webCamBehaviour = (WebCamBehaviour)Object.FindObjectOfType(typeof(WebCamBehaviour)); webCamBehaviour.InitCamera(); mWebCam = webCamBehaviour.ImplementationClass; QCARWrapper.Instance.CameraDeviceSetCameraConfiguration(mWebCam.ResampledTextureSize.x, mWebCam.ResampledTextureSize.y); rslt = 1; }catch (NullReferenceException ex) { Debug.LogError(ex.Message); } QCARWrapper.Instance.CameraDeviceInitCamera(camera); return(rslt); }
/// <summary> /// Initialized the camera /// </summary> public void InitCamera() { if (mWebCamImpl == null) { // in play mode, do not pause when focus is lost Application.runInBackground = true; Camera arCamera = gameObject.GetComponent <Camera>(); if (BackgroundCameraPrefab != null) { mBackgroundCameraInstance = Instantiate(BackgroundCameraPrefab) as Camera; if (KeepAliveBehaviour.Instance != null && KeepAliveBehaviour.Instance.KeepARCameraAlive) { DontDestroyOnLoad(mBackgroundCameraInstance.gameObject); } } mWebCamImpl = new WebCamImpl(arCamera, mBackgroundCameraInstance, RenderTextureLayer, mDeviceNameSetInEditor, mFlipHorizontally); } }
private int InitCameraDevice(int camera) { if (!QCARRuntimeUtilities.IsPlayMode()) { return(QCARWrapper.Instance.CameraDeviceInitCamera(camera)); } int num = 0; try { WebCamAbstractBehaviour behaviour = (WebCamAbstractBehaviour)UnityEngine.Object.FindObjectOfType(typeof(WebCamAbstractBehaviour)); behaviour.InitCamera(); mWebCam = behaviour.ImplementationClass; QCARWrapper.Instance.CameraDeviceSetCameraConfiguration(mWebCam.ResampledTextureSize.x, mWebCam.ResampledTextureSize.y); num = 1; } catch (NullReferenceException exception) { Debug.LogError(exception.Message); } QCARWrapper.Instance.CameraDeviceInitCamera(camera); this.mCameraImages.Clear(); return(num); }
private int InitCameraDevice(int camera) { int rslt = 0; try { WebCamBehaviour webCamBehaviour = (WebCamBehaviour) Object.FindObjectOfType(typeof (WebCamBehaviour)); webCamBehaviour.InitCamera(); mWebCam = webCamBehaviour.ImplementationClass; QCARWrapper.Instance.CameraDeviceSetCameraConfiguration(mWebCam.ResampledTextureSize.x, mWebCam.ResampledTextureSize.y); rslt = 1; }catch( NullReferenceException ex ){ Debug.LogError( ex.Message ); } QCARWrapper.Instance.CameraDeviceInitCamera(camera); return rslt; }
/// <summary> /// Initialized the camera /// </summary> public void InitCamera() { if (mWebCamImpl == null) { // in play mode, do not pause when focus is lost Application.runInBackground = true; Camera arCamera = gameObject.GetComponent<Camera>(); if (BackgroundCameraPrefab != null) { mBackgroundCameraInstance = Instantiate(BackgroundCameraPrefab) as Camera; if (KeepAliveBehaviour.Instance != null && KeepAliveBehaviour.Instance.KeepARCameraAlive) DontDestroyOnLoad(mBackgroundCameraInstance.gameObject); } mWebCamImpl = new WebCamImpl(arCamera, mBackgroundCameraInstance, RenderTextureLayer, mDeviceNameSetInEditor, mFlipHorizontally); } }
/// <summary> /// Initialized the camera /// </summary> public void InitCamera() { if (mWebCamImpl == null) { // in play mode, do not pause when focus is lost Application.runInBackground = true; Camera arCamera = gameObject.GetComponent<Camera>(); mBackgroundCameraInstance = Instantiate(BackgroundCameraPrefab) as Camera; mWebCamImpl = new WebCamImpl(arCamera, mBackgroundCameraInstance, RenderTextureLayer, mDeviceNameSetInEditor, mFlipHorizontally); } }