Log in or register to post comments

Keep AR Camera Alive While Switching Scenes

April 21, 2017 - 7:55pm #1

I need the camera to stay on as the app moves from scene to scene.  I have tried everything and it won't work....

Using Unity 5.6.0f3, Vuforia - Vuforia-VideoPlayback-6-2-10

Made a New test project

Scene 1 - ARCamera , ImageTarget = imageA , Modal Rotation (0,0,0)

Scene 2 - ImageTarget = ImageA , Model Rotation (0,0,180) - rotate simply proves you switched scenes and models.... 

on Scene1 made a script that is attached to the ARCamera called cameraManager

Script class has only 1 method...

public void loadNextSceneTEST() {

  print (" ---  button pressed ");

  DontDestroyOnLoad (gameObject);

  SceneManager.LoadSceneAsync (1);


gameObject should be the ARCamera since the script is attached to the ARCamera.  When you run the switch takes play but I can see my camera light turn off and back on....  The imageTargets are looking for the same image as we want 1 image to be the target through the whole experience...

No matter how I try this the camera will not stay on and it is causing load issues on our real game.  You get to the main menu hit Level 1 and you have to wait for it to load the camera and then the game....  You finish you hit next level and again the camera turns off and back on and you wait for everything to load 5-10+ seconds...

Tried using 1 scene but afraid of the iOS memory warning that you get when you have to many targets or game objects.... so that is out.

Does anyone have a way to simply start the game, turn camera on while the main menu scene is showing.  Hit level 1 and camera stays on and shows level 1 scene.  Hit level 2 and camera stays on and shows level 2, etc.....  To make a smooth transition experience???!!!   

Please Help !!!!  Thank You !!!!!!

Log in or register to post comments