Quantum Console: The Ultimate in Game Development Console

Namespaces are now supported! Using the command use-namespace namespaceName so that you don’t have to type them out every time for generic commands!

Now with the much requested command suggestion popup display!
RectangularWelllitBoa

1 Like

A brand new demo for QC is now available! Check it out!
https://www.qfsw.co.uk/demos/QC/

Quantum Console V2 is finally here! Here is the full whopping changelog!

V2.0.0
Note: It is recommended you remove Quantum Console from your project before downloading this update
Addition 0010: Generic commands are now supported
Addition 0011: Macros are now supported
Addition 0012: New Quantum Theme system; themes are fully customisable and control formatting of returns
Addition 0013: Case sensitivity is now an option for command autocompletion
Addition 0014: Optional popup display for suggested commands
Addition 0015: Namespace system has been added for type resolution
Addition 0016: Nested collections are now supported as arguments
Addition 0017: Stacks and Queues are now supported as arguments
Addition 0018: Type parser now supports primitives, arrays, generics and namespaces
Addition 0019: Type formatter has been massively improved
Addition 0020: Formatter now supports Dictionaries and KeyValuePairs
Addition 0021: 'null' is now supported as an argument for all reference types
Addition 0022: Toggleable timestamps for logs
Addition 0023: Autoscrolling feature for the Quantum Console
Addition 0024: Improved formatting for inputted commands in the console log
Addition 0025: New extra command: add-component
Addition 0026: New extra command: teleport-relative
Addition 0027: New extra command: set-parent
Addition 0028: New extra command: rotate
Addition 0029: Brand new demo scene
Change 0003: Return serialization has been massively improved
Change 0004: Invocation and serialiazation have been decoupled
Change 0005: Text processing has been hugely improved, properly supporting escape characters and scope control
Change 0006: Color and vector parsing has been improved
Change 0007: Scroll sensitivity has been increased
Change 0008: Source has been restructured
Change 0009: All parsing related functionality has been moved to QuantumParser
Change 0010: All registry related functionality has been moved to QuantumMacros
Change 0011: Registry commands are now generic
Change 0012: Formatting in get-object-info has been improved
Change 0013: CTRL and CMD are now one option in keybindings, and SHIFT has been added as a modifier
Change 0014: Removed various command aliases
Change 0015: exec and exec-extern have been removed from WebGL
Bug Fix 0002: Autocompletion sort order for fuzzy searches has been improved
Bug Fix 0003: Command history is no longer cleared on console clear
Bug Fix 0004: Fixed a bug where 'double' type would be displayed as 'int'
Bug Fix 0005: Exception style logs are now formatted correctly
Bug Fix 0006: Fixed GetRegistryContents<>
Bug Fix 0007: Fixed a bug where writer commands were generated for readonly/const fields
Bug Fix 0008: CloseOnSubmit now works
Bug Fix 0009: Fixed a bug where commands with unsupported array typed parameters would not be rejected
Bug Fix 0010: Fixed a bug where the inspector would throw errors during playmode

Quantum Console V2.1.0 is now live! Featuring async command support and much more

V2.1.0
Addition 0036: Async commands are now fully supported
Change 0017: exec and exec-extern are now async commands
Change 0018: exec and all related code has been moved to Extras/exec for easy removal if desired
Change 0019: exec will no longer appear on iOS, PS4, Switch or Xbox One
Bug Fix 0013: Input text no longer becomes highlighted when using the command history
Bug Fix 0014: get-object-info command will now throw a proper error on failure
Bug Fix 0015: Fixed a bug where TypeFormatters and thus theme objects would be corrupted when moving across specific Unity versions

V2.0.2
Addition 0033: Added visibility toggle for scene view mode
Addition 0034: QC can now be easily disabled on release builds, builds etc.
Addition 0035: Added verbose modes to exception handling and log interception

V2.0.1
Addition 0030: Async and thread safe support for logs and Debug.Logs
Addition 0031: Option to initialise the console on startup without activating it
Addition 0032: Scene persistence option
Change 0016: Exposed the Toggle function to the public API
Bug Fix 0011: Fixed a bug where logs and Debug.Logs occuring before the console was initialised would be dropped
Bug Fix 0012: Stopped editor warnings on 2018.3+

V2.1.2 has arrived! The main work has been on internal improvements for performance and capacity, in addition to a fair few extra commands that should help you out. Furthermore, some commands have been upgraded to use async commands

Addition 0039: Maximum number of logs can now be restricted
Addition 0040: New extra command: enum-info (added enum colouring to default theme)
Addition 0041: New extra command: all-scenes
Addition 0042: New extra command: loaded-scenes
Addition 0043: New extra command: active-scene
Addition 0044: New extra command: set-active-scene
Addition 0045: New extra command: unload-scene
Addition 0046: New extra command: unload-scene-index
Addition 0047: New extra command: max-fps
Addition 0048: New extra command: vsync
Addition 0049: New extra command: set-resolution
Addition 0050: New extra command: current-resolutin
Addition 0051: New extra command: supported-resolutions
Addition 0052: New extra command: fullscreen
Addition 0053: New extra command: screen-dpi
Addition 0054: New extra command: screen-orientation
Addition 0055: New extra command: time-scale
Addition 0056: Added MobilePlatforms shortcut to Platform
Change 0020: QC no longer needs the .NET 4.6 API compatability level and only the scripting backend
Change 0021: QC now internally uses string builders for improved performance
Change 0022: Default theme now has IEnumerators default to line seperation and ICollections to [a, b, c]
Change 0023: Extra commands now use their own assembly
Change 0024: Scene commands have been moved to their own file
Change 0025: Scene load/unload commands are now async
Bug Fix 0016: Fixed a bug where auto named commands and command prefixes would not work on fields or classes in Rosylyn
Bug Fix 0017: Fixed a bug where initialize on startup option would not hide the console
Bug Fix 0018: Fixed a bug where whitespace would be treated as args
Bug Fix 0019: Fixed the Switch enum value having the incorrect bit value
Bug Fix 0020: Fixed .NET auto upgrader

V2.2.0 is now live with TMP support!
Let me know what you think and what you want added next!

Addition 0060: Added TMP support
Addition 0061: Added support for backwards command suggestion cycling
Addition 0062: New console command: verbose-errors
Addition 0063: New console command: verbose-logging
Change 0026: Improved bool parsing to support on/off and 1/0
Change 0027: Errors are now more user friendly when using enum arguments
Change 0028: Optimised text generation to reduce string size

V2.2.1 is here with some massive performance boosts!

Addition 0064: New MonoTargetType: Singleton
Addition 0065: New extra command: bind
Addition 0066: New extra command: unbind
Addition 0067: New extra command: unbind-all
Addition 0068: New extra command: display-bindings
Change 0029: Many parts of Quantum Console have been massively optimised
Bug Fix 0022: Fixed a bug where the input field would not focus the first time the console is opened
1 Like

Just getting started with Quantum Console. I’ve got Input.GetKeyDown() checks in a number of places. Is there a strategy for preventing those from firing while Quantum Console is active and taking events?

Thanks!

The way I did it was creating an “Input Module” class which wrapped around the normal input api

This class let me add “blockers”, so that if there were any blockers present, input would never trigger

I then subscribed to the QC events OnActivate and OnDeactivate to add and remove the blocker

If you would like some sample code, please let me know @ScottHerz

That makes sense. Thanks!

Not bad console. Well done!

Thanks!

Hi, first off this is the best console (how do I spent so much money on consoles). Thank you.

Secondly, have you thought about providing a singleton interface to the QuantumConsole class? I want to invoke the console appearing/disappearing from my own input handling logic, and I have to now carry around a reference in my classes to the QuantumConsole which is OK, but something like QuantumConsole.Instance.Activate() would be cool too (unless there are folks that run multiple consoles?)

Thank you for the kind words!

And yes I’ve considered making it into a singleton. It has its pros but some folks are very dissuaded by singletons so I’m still on the fence

What you could do is make singleton wrapper. i.e a script that is a singleton, sits on the QC instance and has a reference to QC. That way if you want to access it from anywhere you can use the singleton wrapper, but doesn’t force QC itself to be a singleton?

If you need any assistance with that I can help write it this evening/tomorrow (taking the day off for Eid with my family)

Thanks!
QFSW

Don’t worry about writing anything, the reference is fine for me, just a thought.

One piece of feedback: you invoke the OnDeactivate event in two places you shouldn’t (in my opinion): in your OnDisable and OnEnable.

I have logic that blocks all input / releases cursor (its an FPS) when the console is shown, and hides the cursor when the console is hidden. When it hides+locks the cursor in OnDisable (as a result of OnDeactivate) it actually persists into the Unity Editor interface! Meaning my mouse is locked (but visible) to the center of the Game panel until I hit escape (Play mode has quit :smile:). This is probably a bug with Unity, but in reality I don’t see what the OnDeactivate in OnDisable will really give: any component needs to remove its event subscription in its own OnDisable anyways, it should be able to cleanup itself there.

The OnEnable instance of OnDeactivate is just weird, it doesn’t cause bad behaviour but having OnDeactivate is a bit smelly.

I have commented out both calls here, and everything is still working fine.

Thanks for the feedback! I’ll do some investigation to see if there was any point of having them, and remove them accordingly for the next update

If you’re enjoying Quantum Console I would appreciate a review :slight_smile:

Thanks

Will do. Also, one laaast thing about the documentation: I know its trivial to find in QuantumConsole.cs, but before you even talk about Command attributes, it would be useful to just have a note about “QuantumConsole has its own input handling code for showing and hiding the console. If you’d like to handle the console lifecycle yourself, use the QuantumConsole.Activate() and QuantumConsole.Deactivate() methods”. You’ll probably write it better than me, but a reference there is useful :slight_smile:

I’m actually planning on a full overhaul of the documentation system to have a mix of pre-written pages, api references etc more similar to how unity does their documentation (not as huge, with more introductory stuff), so I’ll try to get it all in there with a better landing page etc

The reason I put command stuff first in this documentation was because it’s the first thing you’d want for a “minimal setup”

V2.2.2 is here! With a brand new look, improved non static support and extra commands its got it all!

V2.2.2
Addition 0064: Quantum Console now has a brand new look
Addition 0065: Non static commands can now be used on non-monobehaviours (Quantum Registry must be used)
Addition 0066: Formatting in registry errors is now greatly improved
Addition 0067: Quantum Theme can now take a custom material and color
Addition 0068: Quantum Console can now be dragged (default shift + click)
Addition 0069: New extra command: start-coroutine
Addition 0070: New extra command: msaa
Change 0029: Improved readability of collection formatters on dark theme
Change 0030: Improved readability Quantum Theme inspector on dark theme
Change 0031: Improved extra command get-object-info
Bug Fix 0022: Improved stability of TMP upgrader
Bug Fix 0023: Fixed stability issues with theme application
Bug Fix 0024: Fixed a bug where QC would complain about weak delegates even if they were not being used as a command