Quantum Console: The Ultimate in Game Development Console

EDIT: Quantum Console is now live!!
If you own QC, please fill out my survey to help me improve it!

Support: Email | Discord | Issue Tracker | Twitter | Docs | Forum | Demo
Requires TMP and .NET 4.X backend (default)
Quantum Console is a powerful and easy to use in game command console. By simply adding [Command] to your code you can add your own commands and dev cheats to the console!

What can it be used for?
Including, but not limited to:

  • Flexible QA tools
  • Development cheats for testing
  • Debugging assistance
  • In game cheat codes
  • Adaptable to any project

Command Features:

  • Static and non-static commands
  • Command overloads and default parameters
  • Generic commands
  • Async commands
  • Supports functions, properties, fields and delegates
  • Per command platform black/whitelist
  • Easy to use
  • Full C# source included

Console Features:

  • Display Debug.Log messages in the console
  • Highly customisable
  • Custom theme system
  • Command suggestion and autocompletion
  • Text Mesh Pro support

Example Built In Commands:

  • man: generates a user manual for a specified command
  • exec: compiles an executes C# code at runtime
  • #define: defines and creates a user macro
  • instantiate: instantiates a copy of an object
  • destroy: destroys an object
  • get-object-info: gets the transform and component data of an object

Have any queries? Feel free to contact support to help determine if Quantum Console is the solution for you!

Original Post
Allow me to introduce my latest asset, Quantum Console!
3721348--307990--upload_2018-9-26_10-45-34.png

What does it do?
Quantum Console is an easy to use and powerful in game command console. Simply use the [Command] attribute and you can now use it from inside of your game! Here is a GIF of it in action.
FantasticWelloffDuck

What features does it have?
Here is its current feature set. I would LOVE to add more, so please tell me about any features you desire

  • Built in commands (man, help, commands etc)
  • Command history, accessible via arrow keys, just like on system command prompts
  • Tab auto completion, with a display for the parameter signature of suggested commands
  • Support for multiple overloads of the same commands
  • Auto overload generation from commands with default parameters

What does it support?
Currently, Quantum Console supports any static function with a few restrictions.

  • You cannot have two commands with the same name AND parameter count
  • All parameters for the command must be of the supported types (strings, all primitives, vectors, colors, quaternions currently. If you would like to see more types supported, please ask me!)

Fully Customisable
Don’t like the default look? The Quantum Console prefab is fully customisable!
3721348--307999--upload_2018-9-26_10-54-0.png

How to use it?
Very simple, lets go through an example

using QFSW.QC;

public class TestClass
{
   [Command("test")]
   private static void TestFunc(int a = 0, int b = 0) {}
}

This will then automatically generate the following commands

test
test a
test a b

It’s as simple as that! You can then write test 3 into the console to use it

How performant is Quantum Console
In order to make it very easy to use for the end user, Quantum Console has to find the commands. Quantum Console generates a table the first time it is used. This will take about 1-2s, but is asynchronous. Performance hit during this will be minimal, but it is a full table generation with error handling and inspection performed. During this generation, the console will display its load status and will not be usable.
Once it has been generated, performance will be very fast, as it creates a direct mapping from commands to actual functions

Any questions? Any suggestions? I’d love to hear what you all think and want to improve it even further!

2 Likes

When will this be releasing? It looks pretty useful, as I want to have a quick command system becuase it would be a nice way to save some time so I can focus on other things. Could we make these visible in-game as a cheat/custom mode for players?

I aim to release it soon, within a month or so, but I’m not sure

And yes this is possible :slight_smile: just make sure to use preprocessors to stop dev commands from appearing in final builds

Looks pretty solid! I am looking forward to acquiring this asset to use in my games, specially when testing. Best of luck!

Thanks!

Back with a new feature!
You can now add descriptions to commands. These will then appear in the user manual generated by the built in man command. For example, here is the manual for man :wink:

It’s very easy to add! There’s two methods. Either [Command("commandName", "commandDescription")] or add the [CommandDescription] attribute. The latter is useful if you have multiple [Command] attributes on a single function!

Quantum Console now supports properties!

Quantum Console now comes with two new Commands, exec and exec-extern! Here are their manuals

Compiles the given code to C# which will then be executed. Use with caution as no safety checks will be performed. Not supported in builds.

By default, boiler plate code will be inserted around the code you provide. This means various namespaces will be included, and the main class and main function entry point will provided. In this case, the code you provide should be code that would exist within the body of the main function, and thus cannot contain things such as class definition. If you disable boiler plate insertion, you can write whatever code you want, however you must provide a static entry point called Main in a static class called Program

Loads the code at the specified file and compiles it to C# which will then be executed. Use with caution as no safety checks will be performed. Not supported in builds.

By default, boiler plate code will NOT be inserted around the code you provide. Please see ‘exec’ for more information about boilerplate insertion

Quantum Console now supports platform specific commands! You can now white list or blacklist certain platforms with ease!

[CommandDescription("test command only available on mac")]
[Command("mac-test", Platform.OSXPlayer | Platform.OSXEditor)]
private static void MacTest() { }

[CommandDescription("test command only available on windows")]
[Command("win-test", Platform.WindowsEditor | Platform.WindowsPlayer)]
private static void WinTest() { }

[CommandDescription("test command only available in editors")]
[Command("editor-test", Platform.EditorPlatforms)]
private static void EditorTest() { }

[CommandDescription("test command available in everything but linux")]
[Command("not-linux-test", Platform.AllPlatforms ^ (Platform.LinuxEditor | Platform.LinuxPlayer))]
private static void NotLinuxTest() { }

Additionally, you can also use the [CommandPlatform] attribute.

Please let me know what you’d like to see next!

Fuzzy search is now an option!

If fuzzy search is disabled, then your current search must match the beginning of the command to be suggested (foo*). If fuzzy search is enabled, it can be anywhere within the command name to be suggested (foo).

Quantum Console has had some massive improvements!
Let’s get started

Table generation is massively optimised now. Takes a fraction of a second instead of several (still async) as it now skips Unity and System assemblies

GameObjects and Components are now supported as Command arguments! You have to provide the command with the name of the GO, and it will do the rest itself

Fancy error handling for .NET 3

Vector and color parsing has been improved (predefined colours such as red, blue etc can also be directly used)

Non static commands are now supported for Monobehaviours! You can also use MonoTargetType to control whether it is executed on a single instance or all instances

Added assembly definition files

That’s all for today :slight_smile: Hope you all enjoy and would love to hear more ideas!

Back with more big updates!

Fields are now supported! Adding a [Command] to a field will make it behave as if it were an auto property, no extra code needed!

New mono target Registry has been added! The registry lets you register specific instances of a MonoBehaviour type to the QC, which will then be used by any commands with the Registry MonoTarget; this allows you to have full control over the targets if desired

Preset commands have been added. Utilities like destroy, instantiate etc. These all come in an Extras folder and can easily be removed

Command parameters can now have descriptions! This is added by using the [CommandParameterDescription] attribute; said descriptions are included in the manual generated by man

help command has been added, giving a brief guide to the Quantum Console

Exposed a LogToConsole function on the Quantum Console so that you can add your logs if desired

Additional callbacks such as OnInvoke, OnClear and OnLog have been added

I’ve finally finished remaking the prefab from scratch! This means:

  • It now supports 2017.1+ instead of 2018.2+
  • Prefab looks overall cleaner
  • Much easier to adjust the size and have everything adjust itself properly
  • You can now automatically hide and show the console with hot keys due to the new structure

Hope you all like it! I might be able to finish it up within a week or so :slight_smile: Anything else I need to add?

3848992--325474--upload_2018-11-2_13-18-21.png

Quantum Console is now live!!
Pick it up now for only $20!

V1.0.1 has begun development, now supporting delegate fields!
If you add the attribute to a field of a delegate type, it will behave as if it were a normal method

V1.0.1 has now been submitted for approval! As well as delegate fields, it also supports enums as parameter types, and comes with more built in commands!

1 Like

Amongst other goodies like nested arrays and more, Quantum Console now supports generic commands!
PresentShadowyKob

Quantum Console is now getting a brand new demo scene that will be hosted online so you can try before you buy! Check it out!

Quantum Console V1.0.2 is now available!

Quantum Console now has support for custom themes!
4042759--351022--upload_2018-12-28_14-40-47.png

Much more news coming soon, hopefully V1.1.0 will come out Jan 2019, and I’ll do a full post on everything new!