Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Turn on iPhone torch using ARKit

Discussion in 'AR/VR (XR) Discussion' started by skoteskote, May 7, 2018.

  1. skoteskote

    skoteskote

    Joined:
    Feb 15, 2017
    Posts:
    85
    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
     
    clebertavares likes this.
  2. clebertavares

    clebertavares

    Joined:
    Jan 2, 2012
    Posts:
    55
    I am trying these things too... unsuccessful...
     
    skoteskote likes this.
  3. Krusty666

    Krusty666

    Joined:
    Feb 24, 2020
    Posts:
    5
    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.