Introduction to Cosmos Console
Games often feature command consoles to serve as both a debug tool for developers, as well as a way to give players more control to customize game settings or manage game servers remotely. They're similar to command line tools, but with more specialized functionality depending on the game.
Cosmos Console is a command console tool for the Unity game engine, inspired by Source engine games and its RCON protocol by providing a versatile command console that you can use directly from within your game, or remotely over the network.
Usage
As a developer you can configure any type of command you need by specifying the keyword, parameters, and various other settings like validation and execution type. After that you only need to specify handlers in script for when the command is called.
For example, a command that moves a specific Game Object to a certain position could be defined as:
object_move [name] [x] [y] [z]
The console user can then execute it by typing...
object_move Car 10 0 5
.. to move the Game Object with name "Car" to x, y, z coordinate 10, 0, 5 in script.
Learn how to set up the console itself in the Setting Up section.
For details on how to define your own commands, see Console Configuration. For details on how to handle command callbacks, see Handling Command Calls. And finally, for the finer details of command syntax and autocomplete, see Calling Commands.
Commands over network
The network functionality is one of the big features of Cosmos Console. A console can be put into server-mode to act as the 'executing' console where your commands will run.
A server console is usually running within your game build.
A console in client-mode can connect to another server console. Any command submitted to the client console is then forwarded to the server console.
A client console is usually external and doesn't run from within the game itself. The Cosmos Console package provides a client that runs in a custom Editor Window within Unity, and there is also a standalone client.
Multiple client consoles can be simultaneously connected to a single server console.