Introduction
DontDestroyOnLoad keeps an object alive when you change scenes in a game. This helps keep important things like player data or music playing without restarting.
You want background music to keep playing when moving between game levels.
You need to keep player settings or scores without resetting after loading a new scene.
You have a game manager object that controls game state and should not be destroyed.
You want to keep a network connection alive across different scenes.