Essential Systems
  • Welcome
  • Getting Started
    • Quickstart
    • ‼️Installation Guide
  • Systems
    • Object Pooling
    • Audio
    • Camera Shake
    • Console
    • Dialogue
    • Interface
    • Inputs
    • Proximity
    • Spawner
    • UI Components
    • Particles
    • Objects
    • Editor
    • Scenes
    • Utility
Powered by GitBook
On this page
  1. Systems

Console

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

PreviousCamera ShakeNextDialogue

Last updated 3 months ago

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!";
    }
]