Search Unity

How to trigger Camera access popup by script?

Discussion in 'iOS and tvOS' started by Jelmer123, Nov 16, 2021.

  1. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    When accessing the iPhone Camera, a popup appears to ask the user for permission.
    In order to create a good UX flow, I want to ask for permission before I throw the user straight into my AR Scene.
    How can I trigger the permissions popup by script?

    Application.RequestUserAuthorization(UserAuthorization.WebCam) does not work.
    ("webcam not found" is what you get)

    Hmm, the example script does work: https://docs.unity3d.com/ScriptReference/Application.RequestUserAuthorization.html
     
    Last edited: Nov 16, 2021