c# - Decrease the delay between scenes using Vuforia


Keywords:c# 


Question: 

I'm beginner with Unity and Vuforia. Nowadays, I'm doing an application where a Lego excavator can be build using the HoloLens. For this, some words are recognized (TextReco) in order to indicate the user to take a part from this box and then verify is the recognized Part is the correct (ObjectReco and 3d object scanning app). For this process I created 9 different scenes (see Picture)

  1. Read a QR Code
  2. Read a text (get the first piece and put on the table)
  3. verify the first piece
  4. Read a text (get the second piece and put on the table)
  5. verify the second piece
  6. Read a text (get the third piece and put on the table)
  7. verify the third piece
  8. mount piece two into piece one and verify
  9. mount piece three into piece one-two and verify

and the program works fine. However, the switching time between scene- scene takes approximately 5 s and that is too much time. I'd like if some can help me and Anyone how to reduce this time. :)

enter image description here


1 Answer: 

Separate scenes sounds like the wrong approach, it might be better to have one scene and use your own logic to hide/show the text appropriately.

But to answer the question, I suspect that the Vuforia GameObjects are being reloaded for each scene. This is a pretty slow process. So you should load it once in the first scene, and use DontDestroyOnLoad to make it stay around for the other scenes. It literally means that it will not destroy that gameobject when you load a new scene. This should reduce your scene loading time down to practically nil.