Currently testing my games made with Unity with an Xperia Z5. This phone has a built-in camera button at the side, which will usually trigger the camera application when long-pressed. However, when playing these Unity games, the camera button is unable to work - nothing happens when the button is pressed.
An example of how the camera button looks like on Xperia phones:
I’m trying to get the camera button to work as usual, which is to call up the camera app, why is the button unable to work when a unity game is playing?
I run into similar issues like @FlashyGoblin with an old Z4 tablet when accessing the back camera. Strange enough that after the app loses the focus and gets it again, everything works as expected.
Sorry to resurrect an old thread but I am experiencing this with Unity 2019 and 2020, did you have a fix? Same behaviour camera doesn’t work until app is opened once then again and screen is turned off and on again
EDIT: I found the fix, turns out you need to set the Webcamtexture FPS to 30 for it to work on all phones Something like this, where the 30 is the requested fps csharp** **cameraTexture = new WebCamTexture(curr.name, Screen.width, Screen.height, 30);** **