I’ve tried using this solution: fullscreen webcam texture behind everything? - Unity Answers
but the build comes up with loads of errors. I’m very new to this and I don’t really understand what I’m doing wrong.
This is the full code I’ve attached to a texture, as the guide suggests.
using UnityEngine;
using System.Collections;
public void Initialize(){
Debug.Log("Initialize");
BackgroundTexture = gameObject.AddComponent<GUITexture>();
BackgroundTexture.pixelInset = new Rect(0,0,Screen.width,Screen.height);
//set up camera
WebCamDevice[] devices = WebCamTexture.devices;
string backCamName="";
for( int i = 0 ; i < devices.Length ; i++ ) {
Debug.Log("Device:"+devices_.name+ "IS FRONT FACING:"+devices*.isFrontFacing);*_
_ if (!devices*.isFrontFacing) {
backCamName = devices.name;
}
}*_
* CameraTexture = new WebCamTexture(backCamName,10000,10000,30);*
* CameraTexture.Play();*
* BackgroundTexture.texture = CameraTexture;*
}`
I’m sure I’m missing something very obvious. Assume that I know nothing in your answers please!