Log in or register to post comments

Listener for when Vuforia has initialized successfully?

March 8, 2019 - 3:04pm #1

Is there a way listen for when Vuforia has successfully finished initializing?

I've been poking around the internets , looking thru vuforia documentation, and experimenting in Unity but haven't found a good way to do this which seems odd to me (my apologies if I've missed something). The closest thing I've found is to check if InitState is set to initialized.... but this is read only and not something I can listen for?

Listener for when Vuforia has initialized successfully?

March 29, 2019 - 10:57am #3

VuforiaBehaviour has many actions that can be tied to callback functions;

These are the actions:

public static event Action<VuforiaBehaviour> BehaviourCreated;

public static event Action<VuforiaBehaviour> BehaviourDestroyed;

public event Action AwakeEvent;

public event Action OnEnableEvent;

public event Action StartEvent;

public event Action UpdateEvent;

public event Action OnLevelWasLoadedEvent;

public event Action<bool> OnApplicationPauseEvent;

public event Action OnDisableEvent;

public event Action OnDestroyEvent;

 

That can be tied like:

 

Camera.main.GetComponent<VuforiaBehaviour>().OnEnableEvent += OnVuforiaEnabledCallBack;

 

Or testing the vuforia runtime initialization state:

 

if (VuforiaRuntime.Instance.InitializationState == VuforiaRuntime.InitState.INITIALIZED)

{

    OnVuforiaEnableCallBack();

}

Listener for when Vuforia has initialized successfully?

March 8, 2019 - 5:21pm #2

Hello,

In Unity, there are callbacks for when:

Thanks,

Vuforia Engine Support

Log in or register to post comments