I have been using dontdestroyonload singletons for game control objects, and because the game is complex and I don’t want to bung everything into one class, I now have several of these objects carrying over between scenes. Is there any problem with putting each of these control classes onto the one controller object as separate components? And should I put the singleton check on each component or is that just asking for anomalous situations?
And a kind of related question, the event SceneLoaded… would this fire before the Awake on my controller objects or after? (since the controllers are inside the scene) I mean if I try to actually access anything on the controllers in the SceneLoaded event am I likely to be unlucky?
Assuming that none of them rely on the parts they would now share in common (e.g. assuming they don’t use the Transform position, etc) then this will not cause any issues.
The only thing they might get in a tangle with is the main controller class holds the reference to the saveable data, and then the other controllers/modules pick up references to the data that is relevant to them from there, but that I presume is easily handled just as I do it now - having the main controller instantiate the data classes in Awake and leave it till Start for the other modules to reference it.
No guarantees of execution order within an object. The option to move them is only there for organising things in the editor.
Putting different control classes on one manager object would be good composition though. You can let the extra components add themselves to a central manager if needed, and collect anything you want to run in Update() via delegates there. Many objects with Update() will be less efficient than one managing Update() call, as a semi-recent blog post showed.