The Game Startup
- The GameManager component is instantiated immediately when the game loads. It holds reference to the Game State Machine component, providing access to it. In this step, the Animator component, holding the state machine graph is instantiated as well.
- The GameManager boots the game with some initializations, while in parallel the Game State Machine starts in the 'MainMenu' state.
- The 'MainMenu' state causes the UI Manager transition the Main Menu State Machine from its initial 'Idle' state to the 'Home' state.
- The 'Home' state creates the Main Menu GameObject and shows the initial menu page.
Note: The GameManager and the MainMenu state of the Game State Machine start both in the first frame. This is a quite parallel startup, so if there are any dependencies for the Main Menu to show its first page, we should think about introducing an 'Idle' initial state to the Game State Machine. The first transition to the main menu can then be triggered by the Game Manager when everything is ready. I am thinking here especially of necessary loading steps at Game Start, e.g. of Settings.
Links to above mentioned classes:
- Management::GameManager
- Management::GameStateMachine
- UI::MainMenuStateMachine