Scene Overview
You can find the sample scene for the Cosmos Console tool in the CosmosConsole/Examples/Scenes directory.
Instructions
Press the play button to start. The sample scene features a first-person shooter game with an ingame console. The goals is to simply survive and not get touched by any of the enemy 'chompers'.
Player controls:
- WASD: move around
- Mouse: look around
- Spacebar: jump
- Left click: fire projectile
- F1: open console dropdown (the command input field will take focus)
The sample scene uses Unity's old input manager, so make sure it is enabled in your project's Player Settings.
Scene Hierarchy
Notes on the objects in the scene:
- CosmosConsole prefab: contains the UnityCosmosConsole component that manages the console instance. Additionally has the 'Access Logger' and 'Execute On Startup' components, refer to Utility Scripts for more detail on those.
- ConsoleCanvas prefab: the Unity UI canvas of the ingame console. Contains an additional instruction text panel. You can replace this prefab with the ConsoleCanvasCompact prefab, which is an alternative with a smaller UI.
- GameManager object: holds the GameManager and Settings components, and other centralized command handler scripts on a child object.
- Environment object: parent objects of all the static geometry of the level.
- Gates object: holds the GateStructure prefab instances, which all handle the same "open_gate" command. An example of decentralized command handling.
- Player prefab: the player object, using Unity's CharacterController component and first-person controls.
- EnemySpanwer object: spawns enemy 'chompers' at a regular interval (can be adjusted via "enemy_spawninterval" command, handled by the Settings component on the GameManager object).