Preparing the Prefabs and UI
In Chapter 5, Spawning an Army of Units, we were able to instantiate many units using the Debug menu we created. However, the units were spawned at the same place, and we were not able to do anything else with them. Now, we are going to develop a new script that will make it possible to select the units, which is fundamental to giving them an action to perform, such as moving or attacking a target.
We are going to add a few new debugging options to our game to make it possible to enable or disable the camera movement with the mouse, as well as add shortcuts to spawn new units. Then, we are going to start preparing the UI by adding a few new GameObjects to our LevelManager Prefab, and also create visual feedback in the UI to help the player see what is being selected using the mouse on the map.