Reputation: 43
I have 2 scenes with an ARcamera, image target, and directional light on each scene. The problem happens when I build the APK.
It only shows scene 0, never the scene set as 1.
I am quite n00b, what should I do?
Upvotes: 2
Views: 1683
Reputation: 20028
I would assume that your problem is not one related to building the APK. Given that both scenes are added and selected, they should be built just fine. But Unity will not "play" them one after another.
Scene 0 is set as the first scene. So that will be what it starts with. If you want to switch to a different scene, you'll have to code that.
Unity provides several ways to load a different scene through its SceneManager
functionality.
SceneManager.LoadScene(...); //with the scene number or its name
SceneManager.LoadSceneAsync(...); //again, with the scene number or its name
Both allow for single scene loading or additive loading in addition to the already loaded scenes.
In Unity 5.2 or older this used the now considered obsolete Application methods:
Application.LoadLevel(...); //with the scene number, or its name
Application.LoadLevelAsync(...); //again, with the scene number or its name
or the two additive scene loading options, which will leave loaded objects untouched.
So all you need to do is provide some way to make the call to load a different scene, and you should be good to go.
Upvotes: 1