S
S
Sherck2017-05-10 10:39:06
Game development
Sherck, 2017-05-10 10:39:06

What is the best way to save levels in Unity?

They made a platformer pier, in which there were only 2 scenes: the main menu and the level scene.
Prefabs and objects were loaded into the "levels" scene by selecting a level from the main menu using xml. Everything works, but after increasing the number of prefabs and objects (not instances) from 30 to 650, the xmls became unwieldy. What is the best way to store/load levels?
The whole level through the prefab - is it good or bad?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Gaydak, 2017-05-10
@Sherck

A prefab, if roughly, is a scanty and cropped format of a Scene in a unit, just a serialized object.
In the case of the scene:
- it's easier with memory (during transitions, Unity itself tries to delete and unload unused ones)
- you can also separately adjust the light and bake in the scene (reflection light, etc.) (and the skybox here)
- built-in methods in unity with loading (including asynchronous)
is so that I immediately remembered.
But in fact, if everything works for you and there are no problems with performance and memory on the device (due to the large amount of xml), then it’s quite an option to do it like you do.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question