- Home /
Unity wont detect device camera
Simply trying to use WebCamTexture to see video in game. But unity will not detect device camera on laptop or my phone. I know the code works because I used it before. I keep getting this error.
Cannot find webcam device no camera available.. UnityEngine.WebCamTexture:Play() kslklvk:Start() (at Assets/kslklvk.js:10)
Unity simply will not detect the camera on a windows or andriod device to use the WebCamTexture. Please help
Here is the code I am using.
var cam2:UI.Image;
function Start () { var devices:WebCamDevice; var webcamTexture:WebCamTexture = new WebCamTexture(); var renderer:Renderer = cam2.GetComponent(Renderer); renderer.material.mainTexture = webcamTexture; webcamTexture.Play(); }
function Update () {
}
Your answer
Follow this Question
Related Questions
Mobile Device Video Camera 1 Answer
WebCamTexture resolution and cropping problem on Android 0 Answers
Unity Webcamtexture Camera very slow when using markerless ar unity asset 0 Answers
How to get smooth device camera in gearvr like passthrough option? 0 Answers
Possible to use an external camera (USB) while running on Android? 1 Answer