Editor Window Client
The package provides a custom Unity Editor Window that also runs its own console instance. This console can only act as a networked client. To use it, connect to the server console running in your game. Your game can be running within the Unity Editor or as a build on another device, as long as a network connection can be made.
The editor window client here is using commands from the sample scene.
Usage
To get started, you first need game running that has an active console in server-mode. Following the instructions under Quickstart and going into Play Mode should provide a working example.
- In your Unity Editor open the console window via the menu Window → Cosmos Console → Editor Client.
- If the Console Config field shows up, assign a CosmosConsoleConfig asset then press the "Start Console" button. > The reference to the CosmosConsoleConfig asset is stored in the Editor Preferences, you only have to assign it once and it'll use the same configuration when opening the editor window in the future.
The ConsoleEditorClientConfig asset from the CosmosConsole/Examples/Configs directory can be used here as an example. The console config used by a client console does not need to contain any commands (but the local built-in commands, like "help", are still useful). When a client console connects to a server console, all the server's command definitions from the server's console configuration will be send over and show up on the client for autocomplete on the command string input field.
In the top right of the window you'll find a utility window for setting up your remote connection.
If you press "Local IP" you'll see several fields show up. The system will use LAN discovery to find all active server consoles on your local area network, including those running on the same machine if you're testing with a Unity Editor in Play Mode.
The "Direct IP" option allows you to enter the IP through a text field.
- Select the IP, fill in the username and password (the default admin login is user "admin" and password "adminpass"), and press Connect.
Alternatively for step 3 through 5, you could also enter the command "cosmos_connect [ip] [username] [password]" in the console to initiate the connection.
The console should now output that you are connected to the IP specified.
Start typing in the command input field! Press the [Send] button or the Enter key to submit the command string.
Other controls
Use the up and down arrow keys to step through the selection provided by the autocomplete system.
Use Ctrl + Q and Ctrl + E keys to step through the the history of submitted commands. Command history is tracked for the window instance.