Book Image

Building Levels in Unity

By : Volodymyr Gerasimov
Book Image

Building Levels in Unity

By: Volodymyr Gerasimov

Overview of this book

Table of Contents (17 chapters)
Building Levels in Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
4
Dealing with Basic Animations
Index

Level loading and streaming


In Unity, levels can be loaded in four different ways:

  • Loading: This destroys all the objects in the current scene and loads the new one with the loading screen. Optionally, you can specify which objects you don't want to be destroyed from the previous level by code.

  • Loading additively: Unlike normal loading, this doesn't destroy the objects present in the previous level, but adds new objects to them.

  • Loading asynchronously: This loads levels in the background, allowing you to play the game simultaneously or use a loading screen.

  • Loading additively asynchronously: This works in the same way as asynchronous loading, but it preserves the objects from the previous level.

The differences are minor, but they can change the way you build your levels based on the type of the gameplay you are aiming to create.

To test out how level loading works, navigate your character to the Level_Exit prefab that you placed earlier, and a normal loading should initiate.