I’m currently developing a game that makes use of multiple manager scripts to carry our various functionalities (GameManager, TransitionManager, etc.). As these managers are meant to persist across scenes, I’ve used a singleton design pattern in combination with DontDestroyOnLoad(), assigning each manager to a separate empty GameObject. However, I’m now looking to organize these managers. I can’t simply place their respective GameObjects into another empty GameObject acting as a folder, as DontDestroyOnLoad() only works for root GameObjects. I could instead use DontDestroyOnLoad() on the parent folder and preserve the singleton pattern for each manager’s GameObject, but I’m concerned that this violates the modular philosophy of the scripts. I understand that there’s no single correct way to approach this issue, but I’m looking for one that’s considered good practice. Any suggestions?
Bumping this! Any thoughts?