Turn on iPhone torch using ARKit

Crossposting this from Answers:

Hi, I’m doing an AR app for iOS with ARKit and need to be able to turn on the torch for low-light conditions. I can turn on the torch via vuforia using this method but enabling Vuforia overrides the ARKit camera-feed so the screen is all black. I guess there is a way to reapply the ARKit video to the background, but I suspect adding the Vuforia component to the scene interfere with ARKit in other ways?

I have found this answer on how to do it in swift but I have no idea where to put that script and how to access it from a unity UI button. Any ideas or suggestions of where to look?

It seem like it shouldn’t be to complicated since there is an outdated Unity plugin for turning on the iPhone torch.

Add comment

1 Like

I am trying these things too… unsuccessful…

1 Like

Hi,
did you try any Plugin or try to write your own?
I am curious if the LED-light is restricted by apple, because its blocked in Controlling Center too.