- Home /
Scenes won't work when built together
I am making an AR program for the Microsoft Hololens with a few scenes, all scenes involve instantiating GameObjects. They work perfectly on their own but when I build them together only the first scene works as designed, this is the case even when I change the order. The rest of the scenes all instantiate two objects instead of one on the first click. All scenes have different scripts and different GameObjects and I'm using LoadSceneMode.single to load the scenes.
Please help!
Answer by Legend_Bacon · Mar 15, 2018 at 03:46 PM
Hello there,
Make sure your objects don't have DontDestroyOnLoad() in their Awake() methods. If they did, they would transfer to the next scene without being deleted, which would cause you to have them twice, then 4 times, then 8, etc...
Hope that helps!
Cheers,
~LegendBacon
Answer by bp15767 · Mar 15, 2018 at 04:16 PM
Thank you for the reply, but I checked and none of the objects have DontDestroyOnLoad() in their scripts
Your answer
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
Game build taking days? 1 Answer
Can't build my game! 1 Answer
Android app bundle(aab) build problem 2 Answers
Distribute terrain in zones 3 Answers