Unity Learn home
View Tutorial Content

Implement data persistence between scenes

Tutorial
Foundational
+10 XP
20 Mins
(2456)
Overview
For Educators
Summary
In this tutorial, you’ll learn how to use data persistence to preserve information across different scenes by taking a color that the user selects in the Menu scene and applying it to the transporter units in the Main scene. By the end of this tutorial, you will be able to:
  • Ensure data is preserved throughout an application session by using the Unity DontDestroyOnLoad method
  • Recognize when to use static classes, singletons, and static variables to implement data persistence
  • Modify a GameObject with a script that contains the variables to be saved between Scenes
Select your Unity version
Last updated: January 03, 2024
2022.3
2022.2
2022.1
2021.3
2020.3
Language
English
Implement data persistence between scenes