Vuforia: Delayed Initialization Explained

11 Dec

Vuforial is a widely used AR toolkit, and if you use it for some time, you will find “Delayed Initialization” for sure.


You would like to try it, right?

Go and do it, cry please, you will see below errors:

Vuforia cannot be started before it is initialized.Please disable Delayed Initialization in the Vuforia configuration or initialize Vuforia manually with the VuforiaRuntime-class.


You would Google this, frustrated, as you can hardly find good answers, and here is why this article comes into play.

Why you prefer the delayed initialization? Simple, your app does not always start from an AR mode, and maybe you have a button , and only when you click button, do you start the target recognition.

A 2nd reason for delayed initialization is the speed, you don’t want to start from the AR mode, and then manually disable it, right?

A 3rd reason, if you start by initialize the AR mode, and then disable it, you will see your camera’s light flashes, though it is very quick. Connect your web cam, run a Vuforia powered app with default settings, you will see that clearly: We need you, delayed initialization. But how?

To enable this, first you need turn off a script first:

  • Select your ARCamera object
  • You will see a “Vuforia Behaviour (Script)” component
  • Disable this component
  • Enable/Check delayed initialization option in Vuforia Configuration Panel


Run it. Aha, it worked! No errors, no warning, no camera flashes, super fast!

Go and grab a coffee. Emm, let’s turn on the AR mode and start Vuforia again when needed. It is not as easy as imagined:

  • Disable/Uncheck delayed initialization programmatically
    VuforiaAbstractConfiguration.Instance.Vuforia.DelayedInitialization = false;
  • Enable the “Vuforia Behaviour (Script)” component, programmatically
    ARCamera.GetComponent<VuforiaBehaviour>().enabled = true;

Cry again, it does not work!

So to manually start/initialize Vuforia again, there is a simple trick, read the aforementioned warning message, you will see:

initialize Vuforia manually with the VuforiaRuntime-class.

So just use below code when you click button, to start the target recognition:


That is it! Happy coding!

One bonus you will see is that, when you start and then stop the App, if you don’t use delayed initialization, you will see below errors:


If you use delayed initialization, for whatever reasons, the above errors are gone. Weird? Cool? You can tell …


Posted by on December 11, 2017 in Programming, Unity 3d, Vuforia (QCAR)


Tags: , , , , ,

3 responses to “Vuforia: Delayed Initialization Explained

  1. Fatin Nawaz

    April 9, 2018 at 10:06 pm

    Can you help me with this? It’s still not working

  2. Wafa

    June 26, 2018 at 1:54 am

    I don’t understand. How should we do it? Where do I add that line of code that will solve all our problems? Thank you!

  3. novan purnama

    January 25, 2019 at 8:51 pm

    how can i init vuforia camera from another scene ?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: