MonoBehavior in Unity spawn in a scene and then get destroyed when the scene is unloaded. But, data should be living even after scene transitions happens. To make it possible, keeping MonoBehaviors live before and after scene transitions.
This post instructs how to achieve Singleton MonoBehavior in Unity C that stay living even after scene transitions.
Singleton is a well-known design pattern in the industry for long time and it's useful for having data and states in-memory or limit an active instance only one at the same time.
In