Answer the question
In order to leave comments, you need to log in
How to work with scenes in Unity?
I’m just starting to learn Unity and I’ve come across such a moment that sometimes I don’t understand how to correctly google this or that question and, accordingly, I can’t find the answer.
Now I'm making a simple 3d game, where at each next level the player must open the doors and look for the keys to them. I'm trying to figure out how to work with scenes and levels in this game. For example, I create scene 2, and it, of course, is empty. Do I need to copy and paste everything from the first scene (character, scripts and items) or is there another way? Or maybe you don’t need to create scenes for each individual level at all? Also, the game slows down in the second scene, so I'm trying to figure out how to make the location not fully load, but as the player advances? Or slows down due to the fact that I transferred objects from scene 1?
Please share your experience or advise what and where to read on these issues.
Answer the question
In order to leave comments, you need to log in
1. Make prefabs of game objects and terrain. Later, just flip to new scenes.
2. You need to create scenes in Unity itself and not during the gameplay.
3. So that part of the level (scene) is loaded after passing part of the level, you can make a trigger, and simply make the part of the level itself a separate GameObjectom and cut this GO at the beginning of the level, and later, under some condition, for example, the trigger was touched. Make this GO active.
4. You need: trigger, prefabs.
There will be no slowdown due to the fact that you will transfer objects from scene 1 to scene 2. The main thing is to competently do everything and not to throw in 5k GO so that the PC starts coughing
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question