This section explains how you can create new commands to expand your library.

Create a new command

There are three ways to create a new command:

a. Right click in any folder of your project and select
Create -> Command Console -> Command Scriptable

Create Command

b. Open the Command Browser (Tools -> Command Console -> Command Browser) and click the Add New button. The command will be created in then same folder of the selected group.

Create Command

c. Open the Command Browser (Tools -> Command Console -> Command Browser) and click the Copy button to duplicate an existing command.

Create Command

Command Settings

Click on a command scriptable to open the Inspector and edit the its settings.

Command Settings

Command Definition

Setting Description
Command String The string used to execute the command from the console prompt. Cannot contain spaces or special characters such as (-,&,%,$, etc...)
Execution Mode Sync or Async command. See Execution Mode for more details.
Command Availability You can define if a command will be available in the Editor, at Runtime, or both. Unavailable commands cannot be executed and will not show up in the list of commands when you use the "help" command.
Exclusive If Execution Mode is set to Coroutine you can define this command to be executed in exclusive mode (see Execution Mode for more details).
Development Build Only You can define if this command will be available in Development build only. Useful for debug commands that you don't want to be available in your final release of the game
Use Custom Namespace Turn this on if you want to define a custom namespace for this command (see Namespaces for more details).
Custom Namespace The custom namespace to use, if Use Custom Namespace is checked.
Show Help Editor Turn this on to show the help text areas in the inspector where you can define the help texts that will be shown when calling this command with the -? parameter.

Parameters Editor

In this section you can edit the parameter values that you can pass to a command. See Parameters for more details.

Code Generation

Click the Generate/Update Code button to apply the modified settings and recompile the command code. You can then edit the generated file by clicking the Edit Code button. This button attempts to open the file in Visual Studio, if it doesn't work for some reason, the generated code files are located in the "Generated" folder alongside the command scriptables.