I have a very simple project setup running this script.
using UnityEngine;
using UnityEngine;
using System.Collections;
public class testScript : MonoBehaviour {
void Start() {
WebCamTexture webcamTexture = new WebCamTexture();
Renderer renderer = GetComponent<Renderer>();
renderer.material.mainTexture = webcamTexture;
webcamTexture.Play();
}
}
This doesn’t seem to work when deployed to the setup I listed off in the subject, works fine in preview. When deployed to the phone I just get a black image on the plane I have the test script attached to.
I don’t want to upgrade Unity cause I need to keep the code base the same as I use this same code io deployments and don’t want to fix the bugs that will occur from upgrading. Can anyone help me? Is this a known bug?