Log in or register to post comments

Multiple scenes Vuforia 6.5 crash

December 13, 2017 - 1:47am #1

Hello,

 

I spent last week to solve this problem, and no any success.

Problem with multiple scenes using  Vuforia objects is really old. But for previous versions of Vuforia was fixed. As I saw on forum, 2 years ago this problem was fixed and it was just 'keepalive', one ARCamera in projects and it was working, now..

I spent so many hrs to adjust stereo for ODG-R7, and its still not working as good as I wanted. I though that's the end of my problems... but then I realized about next one. 

I've got 5 scenes. Each of them contains ARCamera, ImageTarget and VirtualButton to change scenes. Everytime when I want to change scene to the next one, camera is crashed. The problem is the same as in previous versions, but how to solve it now?

This problem is only on my ODG-R7glasses and also in play mode when I switched in Vuforia to Optical-See through device. On tablets, phones it's working fine.

 

I've found such a information:

The KeepAliveBehaviour has been removed and needs to be replaced by a custom script. Any Vuforia game object can be kept alive with the Unity method DontDestroyOnLoad. It is also possible to delete Vuforia game objects. If trackable game objects are deleted or kept alive, it is necessary to reassociate Vuforia trackables with Unity game objects:

TrackerManager .Instance.GetStateManager().ReassociateTrackables();

 

and also this one:

 

If your project contains multiple scenes using Vuforia, it might be necessary to manually change settings for each scene. The settings in the global configuration window (Vuforia/Configuration) apply to all scenes in the project. You can change the settings before loading a new scene with the VuforiaConfiguration-class. The changes will apply to all future scenes.

As an example, you can change the loaded and activated datasets for subsequent scenes with this code:

var datasets = new [] { "tarmac" };

VuforiaConfiguration .Instance.DatabaseLoad.DataSetsToLoad = datasets;

VuforiaConfiguration. Instance.DatabaseLoad.DataSetsToActivate = datasets;

SceneManager .LoadScene(...)

 

Could someone tell me how to fix it?

Any advice?  Which script need to be changed and how, then where I need to put it?  Thank's for any help.

Log in or register to post comments