- Home /
Question by
dragologic · Aug 21, 2019 at 12:10 AM ·
webcamtexturewebcam
Unity freeze on WebCamTexture Play
Hi. I have a problem with WebCamTexture.
public class ExampleClass : MonoBehaviour
{
void Start()
{
WebCamTexture webcamTexture = new WebCamTexture();
Renderer renderer = GetComponent<Renderer>();
renderer.material.mainTexture = webcamTexture;
webcamTexture.Play();
}
}
This simple code make Unity freeze. So I guess Unity cannot access my laptop camera from some reason.
Comment