top of page

Simple Game Console is tool that you can put to your game. This will allow you to invoke functions by typing commands in console.

What is ‘Simple Game Console’?

Setup ‘Simple Game Console’

Import ‘Simple Game Console’ to your project inside Unity3d. Once imported, find folder named ‘SimpleGameConsole’, click on it. Now inside that folder find ‘Console Command’ prefab. Drag that prefab to your scene.

You just finished setup of game console.

Scripting Reference:

ConsoleCommand.cs

ConsoleCommand is a Singleton. Access its functions through static field named Instance. Example:

ConsoleCommand.Instance.SetEnabled(true);

SetEnabled(bool) – Disable or enable game console.

WriteText(string) – Write text to console output window.

ExecuteCommand (string) – Execute console command from script.

SetConsoleInput (IConsoleViewInput) – Assign custom console controller. Create new class and implement IConsoleViewInput interface if you want to create your own controller for console window.

InitCommandsList () – Finds and creates the command list. Call this function if you have gameobjects with commands, which appear on a scene at runtime.

InitConsoleView () – Search ConsoleViewBase in scene and connect to it. If ConsoleViewBase not found create default console view in scene. Create a new class that derives from ConsoleViewBase and add it to a scene to create your own custom appearance to console window.

Video example:

bottom of page