EXECUTION MODE

You can define two different execution mode in the command inspector: Sync and Async (Coroutine)

Execution Mode


Sync Commands

This is the default execution mode: the code will be executed in a sequential manner and cannot leave the code block until its completion.


Async Commands

Async commands use Unity's coroutines to run tasks in the background. You don't have to do anything different to execute an async command, just type it in the console promt like normal commands.

NOTE: Async command are only available at runtime and will not work when the console is running in Editor Mode.

Exclusive Mode

Check the Exclusive flag in the inspector to make a command run in Exclusive Mode.

Exclusive Mode

When a command is set to be exclusive, starting it will automatically stop all other async commands of the same type.

Async Tools

A built-in command named async is provided to manage background tasks.

Async Command

  • Use async -list to view a list of all running background tasks, and their ID.
  • Use async -kill to stop a specific task, given its ID.
  • Use async -killAll to stop all background tasks.