You can’t test Camera Stream with WebCamTexture from Mobile Phone (docs are wrong), so in Unity Editor & on Mobile Phone you will see Camera Stream from laptop. If you know the magic of how to make it work, please share it in comments. Unity Remote 5 Not Working. To solve your problems Check Tutorials: Android; iOS. Unity Issue Tracker. Description WebCam Textures are textures onto which the live video input is rendered.
Hey there,
I've already asked a question about how to get the android lock screen enabled in dev builds because I need to debug an issue which only occurs when the lock screen is shown. However I thought I ask if anyone knows how to just solve the problems I'm having.
I'm almost certain it has something to do with the WebCamTexture as, in most parts of my app, I can lock then unlock the device just fine. In the one part which uses a WebCamTexture to show the feed from the device's camera on screen, things go wrong.
What tends to happen is that once I unlock, the app resumes but some of my UI elements are missing. Specifically the RawImage displaying the WebCamTexture is missing as are any UI elements in the same level of the Unity Editor's hierarchy or lower. UI elements higher up the hierarchy are present and correct. In my case this means before I lock the device I can see this;
An exit button in the top left, my WebCamTexture center, and two buttons along the bottom. However after I unlock the screen I see this;
All the UI bar the exit button is missing. Sometimes the app continues to work though all I can do his hit the exit button. Sometimes it crashes shortly after. I've tried my best to work around the problem by disabling the WebCamTexture when the lock occurs and so on but so far I've had no luck.
Any advice would be gratefully received.
Unity Webcamtexture Android Rotation
1.png(403.4 kB)