(Using Unity 2017.2 + Vuforia 6.5.22)
Not all scenes in this project need Vuforia (and device camera) so I'm trying to prevent Vuforia starting itself and creating "BackgroundPlane" object to all scene Cameras. "Delayed initialization" option is enabled in VuforiaConfiguration but Vuforia is still trying to start itself when the application is started.
How to reproduce:
- Create an empty Unity project (3D)
- Enable Vuforia in Player Settings -> XR Settings
- Enable "Delayed initialization" option in VuforiaConfiguration
- Run the project. You'll get an error:
Vuforia cannot be started before it is initialized.
Please disable Delayed Initializationin the Vuforia configuration or initialize Vuforia manually with the VuforiaRuntime-class.
Any help how to prevent Vuforia trying to start itself automatically at application startup? Thanks!
We had used Delayed Initialization because there's only an optional subsection of our game that uses augmented reality, and we didn't need to present the camera permissions alert immediately. When the user chooses to enter the augmented reality scene, we first prompt for camera permissions. Once camera permissions are granted, the user enters the augmented reality scene. When the user enters that scene, we manually initialize Vuforia with VuforiaRuntime.Instance.InitVuforia();
However, now the camera permissions dialogue is presented immediately upon app launch, even though Vuforia is not initialized.