Setting up the console
Quickstart
To get started right away, you can use the prefabs from the sample scene.
- Drag the CosmosConsole and ConsoleCanvas prefabs from the CosmosConsole/Examples/Prefabs/Console directory into your scene.
- On the CosmosConsole object you just created, assign a CosmosConsoleConfig asset to "Config Container" field on the Unity Cosmos Console component. For a quick example can use the ConsoleGameExampleConfig from the CosmosConsole/Examples/Configs directory.
- Make sure there is a Unity EventSystem object in your scene.
- Launch into Play Mode.
- Press F1 to open the console and start typing (for example the "help" command).
- Press Enter to submit the command.
This sample uses the Unity UI package and requires the old Input Manager to be enabled in PlayerSettings to handle keyboard input
For more details on the provided prefabs and the scripts, check the Scene Overview and Utility Scripts sections.
Creating your own commands
Check the section on the Command Configuration on how to get started defining your own commands.
Send commands over the network
Check the sections on the Editor Window Client and Standalone Client to learn how to connect to your game from a remote console.
Scripting
Check the Scripting Overview section on how to get started.