Hello,
I'm having an issue when reloading a scene.
Apparently Vuforia Behaviour keeps looking for the original instance of both ARCamera and ObjectTarget, so when i restart the scene I get these for every frame:
Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> UnityEngine.MissingReferenceException: The object of type 'Camera' has been destroyed but you are still trying to access it.
Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> UnityEngine.MissingReferenceException: The object of type 'ObjectTargetBehaviour' has been destroyed but you are still trying to access it.
I tried then to DontDestroyOnLoad them, and avoided having duplicates.
Very weirdly, yesterday it stopped giving me those errors, but today, without changing anything relevant, it still gives me the second one about the ObjectTarget, even if I'm not destroying it.
My question is then, what are the best practices when reloading a scene with Vuforia? Is there something I'm missing? Should I unregister the original target first and then register a new instance of it? How would I do that?
Thanks.
Same Issue here!!
Same Issue here!!
Hi,
Hi,
I've quickly tested the behavior with Vuforia Core Samples and the ImageTargets scene. I attached a script to the ARCamera which always reloads the current scene when "R" is being pressed..
Unfortunately I was *not* able to reproduce the issue.