"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

I am getting this error: There may be only one VuforiaBehaviour instance in the scene

In my unity script I load and unload scenes that have AreaTargets (I am using LoadSceneMode.Additive).

Everything works fine while testing on unity editor, but once I run the application on my Ipad I get this error while switching between scenes:

"There may be only one VuforiaBehaviour instance in the scene"

sometimes, I get another error:

NullReferenceException: Object reference not set to an instance of an object"\.

DefaultObserverEventHandler.OnDestroy () (at <0000...000>:0)

Does anyone have any idea about it?

 

Hey there,

 

Can you validate if the ARCamera isn't loaded twice (from the current and previous scene)? LoadSceneMode.Additive adds the current scene to the other loaded scenes. This could mean that two ARCamera's are added and that's why you might receive the error.