it seems more tricky now with new camera2 api. In the old way, you can do setFlashMode()/startPreview() and it works. But now it's using CameraManager in the android side, which is more complicated. I can toggle flashlight when no camera is used, but not when unity is using webcamtexture. Is there easy way (using AndroidJavaClass etc) to do that? If not, is there any way to do that without me writing my own WebCamTexture?
Asked
Active
Viewed 631 times
1
-
Did you try [this](http://stackoverflow.com/a/41571691/3785314)? – Programmer Apr 11 '17 at 04:56
-
1that one is calling setTorchMode(), which doesn't work when the camera is already on – Sunny Chow Apr 11 '17 at 06:49
-
@SunnyChow Have you got any answer for this ? – GuruJeya May 16 '19 at 18:08