Log in or register to post comments

Object Target breaking when reloading a scene.

April 13, 2018 - 3:01am #1

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.

Object Target breaking when reloading a scene.

September 11, 2019 - 5:21am #3

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.

Could you please provide details on how you are reloading the scene? + confirm SDK version and Unity version?

Thank you.

Vuforia Engine Support

For testing I used: SDK version 8.3.8 and Unity 2019.2.2

Object Target breaking when reloading a scene.

September 9, 2019 - 1:02pm #2

Same Issue here!!

Log in or register to post comments