Developer Console

Published by

on

Developer Console | Feature Image

Developer Console

This is an in-game developer console I made in Unity. It is built on UGUI and heavily inspired by the dev consoles found in a number of games like Half-Life & Half-Life 2. As such, it can use commands and variables, but it will not interpret expressions. It also has a history so you can use up/down to quickly access commands you just used. It is setup as a prefab, and is quite customizable. You can change the set of built in message types, and change their text colors. For example, error messages are red by default.

My developer console uses a register function to tell it about a console command, which gives it a few parameters such as the command’s name, and the function to call when it is invoked by the user. You can also tell it whether the command should be invokable from scripts, the console, or both via the access level parameter.

In hindsight, one thing I’ve learned since that I’d do differently is use an attribute to define a console command function. I could probably add this feature in easily enough, but maybe another day.

EngineUnity 2020.3
IDEVisual Studio
LanguageC#
Project Duration2018
Relevant SkillsUnity
  UGUI
C#
Visual Studio
Source Control

Screenshots

Click images to enlarge.

Related Posts

No results found.

Leave a comment

Design a site like this with WordPress.com
Get started