Unity Singleton Monobehaviour component, that can be attached to Game Objects. You can use SingletonPersistent
to persist the instance among scenes
or just Singleton
class to use the same instance on the only one scene.
- Managers that should use the same instance among scripts (e.g GameManager, ScoreManager, InputManager...)
- When you need use any component that depends of a Game object in the scene (e.g access
AudioSource
inside of an singleton)