๐ŸžIn-game Debug Console

Used to check runtime logs without Android logcat and send commands

How to use

To enable in-game debug console go to _Loader scene and enable object "IngameDebugConsole" in heirarchy.

some examples of commands add from git documentation:

Preffered method
void Start() {
    DebugLogConsole.AddCommand( "destroy", "Destroys " + name, Destroy );
    DebugLogConsole.AddCommand<Vector3>( "cube", 
        "Creates a cube at specified position", CreateCubeAt );
    DebugLogConsole.AddCommand<string, GameObject>( "child", 
        "Creates a new child object under " + name, AddChild );
}

void Destroy() {
    Destroy( gameObject );
}

public static void CreateCubeAt( Vector3 position ) {
    GameObject.CreatePrimitive( PrimitiveType.Cube ).transform.position = position;
}

private GameObject AddChild( string name ) {
    GameObject child = new GameObject( name );
    child.transform.SetParent( transform );
    return child;
}

More info in Documentation on GIT

Last updated