Application vs Scene Services
Which type should I use?
Section titled “Which type should I use?”Use an Application MonoBehaviour Service when
Section titled “Use an Application MonoBehaviour Service when”The service should continue existing while scenes change.
Good examples include:
PlayerManagerAudioManagerUIManagerSettingsServicePrefabDatabaseUse a Scene MonoBehaviour Service when
Section titled “Use a Scene MonoBehaviour Service when”The service should disappear when its scene disappears.
Good examples include:
LevelServiceEnemySpawnerCheckpointManagerSceneAudioControllerInteractableManagerLevelConfigurationA useful rule is:
If the service needs Unity references and should survive scene changes, make it an application MonoBehaviour service. If it needs Unity references that belong to a particular scene, make it a scene MonoBehaviour service.