Hi all,
I have been building bits of games and UI for a few years, and I always get tangled up when it comes to turning things into a single game. I am totally self-taught (using Unity Learn, some Udemy courses, and lots of YouTube), so I apologise for not having any actually programming eduction.
When I am building a module (e.g. MyInputSystemInterface, MyTitleMenu, MySaveLoadSystem, etc) I am making it modular, testable, decoupled, etc. But when it comes to building a full game, I want more control over the order in which everything is Awakened, Started, etc. This is so I can assemble my GameManager first, then the UIManager, then get them to subscribe to relevant events from each other AFTER they are both assembled.
I fine this problem starts to overcomplicate my code even for very simple games.
The route I am trying is to use a Bootstrappable : Monobehaviour class, which implements IBootstrappable (requiring void Assemble() and void Initialise()) from which to derive all monobehaviours that need to be loaded at startup. There is also a Boostrapper monobehaviour which takes an ordered Bootstrappable array in the Inspector of components.
I would love to know if:
- I am going about this the right way
- There is a neat trick that I am missing (that probably anyone with a GCSE in Computer Science would know)
- There are any resources online you can recommend to deal with this. FYI I have read lots about design patterns but find they are a bit too abstract for me to work out how to apply them in this case.
I am probably just missing the really obvious, so happy to have the pointed out to me!
Thanks in advance
Ben
