Getting Started

Prefab

This first thing to do is to drag the PowerConsole prefab from PowerConsole/Prefabs into your root scene. You only need to add the prefab to your first scene as it will be automatically reused from then on

Initialise

Do not attempt to interact with PowerConsole until after Initialise has been called

Add the namespace reference

C#
using CI.PowerConsole;

Call Initialise from the Awake or Start function in your first scene. You only need to do this once

C#
PowerConsole.Initialise();

Open the console

You can open the console with a keyboard shortcut

Command
ctrl + i

or programatically with

C#
PowerConsole.IsVisible = true;

Log a message

You can easily log a message with a severity level

C#
PowerConsole.Log(LogLevel.Error, "Hello World");

Commands

Add a command - see the commands section for more detail

C#
PowerConsole.RegisterCommand(new CustomCommand() { Command = "my command", Callback = MyCallback });