Console

To make development easier, faster and more interactive, we created a simple to use Command Console.

Currently, in the console demo scene, you can access the console by pressing "F7" when playing the game. Here you can type any command you create (which we will do in the next paragraph) or type "help" to list all commands and their descriptions.

To create a new command you simply have to annotate a public static string method with:

[Command("<command-name>", "<description>")]

For example:

public class TestClass : MonoBehaviour
{
    // any code here
    
    [Command("say-hello", "simply says hello")]
    public static string SayHelloCommand(out EConsoleColor color, params string[] args)
    {
        color = EConsoleColor.Output;
        return "Hello!";
    }
]

Last updated