Included Commands
Quantum Console comes with many commands included out of the box for the user's convenience. Some of these commands are core commands, whereas others are extra commands.
Core Commands
Core commands are implemented within various parts of Quantum Console such as QuantumProcessorCommands.cs
and QuantumRegistry.cs
They can be removed by using the preprocessor QC_DISABLE_BUILTIN_ALL
Name |
Description |
help |
Shows a basic help guide for QuantumConsole |
man |
Generates a user manual for any given command, including built in ones. To use the man command, simply put the desired command name in front of it. For example, man my‑command will generate the manual for my‑command |
commands |
Generates a list of all commands currently loaded by the Quantum Console Processor |
register‑object<T> |
Adds the object to the registry to be used by commands with MonoTargetType = Registry |
deregister‑object<T> |
Removes the object to the registry to be used by commands with MonoTargetType = Registry |
clear‑registry<T> |
Clears the contents of the specified registry |
display‑registry<T> |
Displays the contents of the specified registry |
use-namespace |
Adds a namespace to the table so that it can be used to type resolution |
remove-namespace |
Removes a namespace from the table |
all-namespaces |
Displays all of the namespaces currently in use by the namespace table |
reset-namespaces |
Resets the namespace table to its initial state |
#define |
Adds a macro to the macro table which can then be used in the Quantum Console. If the macro name is added, then all instances of #name will be expanded into the full macro expansion. This allows you to define shortcuts for various things such as long type names or commonly used command strings. Macros may not contain hashtags or whitespace in their name. Note: macros will not be expanded when using #define , this is so that defining nested macros is possible. |
remove-macro |
Removes the specified macro from the macro table |
clear-macros |
Clears the macro table |
all-macros |
Displays all of the macros currently stored in the macro table |
dump-macros |
Creates a file dump of macro table which can the be loaded to repopulate the table using load-macros |
load-macros |
Loads macros from an external file into the macro table |
verbose-errors |
If errors caused by the Quantum Console Processor or commands should be logged in verbose mode |
verbose-logging |
The minimum log severity required to use verbose logging |
logging-level |
The minimum log severity required to intercept and display the log |
max-logs |
The maximum number of logs that may be stored in the log storage before old logs are removed |
clear |
Clears the Quantum Console |
qc-script-extern |
Executes an external source of QC script file, where each line is a separate QC command |
Extra Commands
Extra commands are implemented as in separate classes and files that are found in the Extras
folder; these commands are added for convenience and are not required.
They can be removed by using the preprocessor QC_DISABLE_BUILTIN_ALL
or QC_DISABLE_BUILTIN_EXTRA
UtilCommands.cs
Name |
Description |
get‑scene‑hierarchy |
Renders the GameObject hierarchy of the currently open scenes |
get‑object‑info |
Finds the first object in the scene with the name objectName and displays its transform and component data |
destroy |
Destroys a GameObject |
instantiate |
Instantiates a GameObject |
teleport |
Teleports a GameObject |
teleport‑relative |
Teleports a GameObject by a relative offset to its current position |
set-active |
Activates/deactivates a GameObject |
send-message |
Calls the method named methodName on every MonoBehaviour in the target GameObject |
add‑component<T> |
Adds a component of type T to the specified GameObject |
rotate |
Rotates a GameObject |
ScreenCommands.cs
Name |
Description |
fullscreen |
Fullscreen state of the application |
screen‑dpi |
DPI of the current device's screen |
screen‑orientation |
The orientation of the screen |
current‑resolution |
Current resolution of the application or window |
supported‑resolutions |
All resolutions supported by this device in fullscreen mode |
set‑resolution |
Sets the resolution of the current application, optionally setting the fullscreen state too |
capture‑screenshot |
Captures a screenshot and saves it to the supplied file path as a PNG. If superSize is supplied the screenshot will be captured at a higher than native resolution. |
SceneCommands.cs
Name |
Description |
load‑scene |
Loads a scene by name into the game |
load‑scene‑index |
Loads a scene by index into the game |
unload‑scene |
Unloads a scene by name |
unload‑scene‑index |
Unloads a scene by index |
all‑scenes |
Gets the name and index of every scene included in the build |
loaded‑scenes |
Gets the name and index of every scene currently loaded |
active‑scene |
Gets the name of the active primary scene |
set‑active‑scene |
Sets the active scene to the scene with name sceneName |
GraphicsCommands.cs
Name |
Description |
max‑fps |
The maximum FPS imposed on the application. Set to -1 for unlimited |
vsync |
Enables or disables vsync for the application |
msaa |
Gets or sets the number of msaa samples in use. Valid values are 0, 2, 4 and 8. |
TypeCommands.cs
Name |
Description |
enum‑info |
Gets all of the numeric values and value names for the specified enum type |
TimeCommands.cs
Name |
Description |
time‑scale |
The scale at which time is passing by |
CoroutineCommands.cs
Name |
Description |
start-coroutine |
starts the supplied command as a coroutine |
exec/DynamicCodeCommands.cs
Name |
Description |
exec |
Compiles the given code to C# which will then be executed. Use with caution as no safety checks will be performed. Not supported in AOT (IL2CPP) 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 |
exec‑extern |
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 AOT (IL2CPP) builds. By default, boiler plate code will NOT be inserted around the code you provide. Please see 'exec' for more information about boilerplate insertion |
KeyBinderModule.cs
Name |
Description |
bind |
Binds a given command to a given key, so that every time the key is pressed, the command is invoked |
unbind |
Removes every binding for the given key |
unbind‑all |
Unbinds every existing key binding |
display‑bindings |
Displays all existing bindings on the key binder |
MegaCommands.cs
Name |
Description |
call‑static |
Invokes the specified static method or property with the provided arguments. Provide [argTypes] if there are ambiguous overloads |
call‑instance |
Invokes the specified non-static method or property with the provided arguments. Provide [argTypes] if there are ambiguous overloads |
FileCommands.cs
Name |
Description |
write‑file |
Writes the provided data to a file at the provided path |
read‑file |
Reads the contents of the file at the provided path |
ApplicationCommands.cs
Name |
Description |
quit |
Quits the player application |
HttpCommands.cs
Name |
Description |
http.get |
Sends a GET request to the specified URL |
http.delete |
Sends a DELETE request to the specified URL |
http.post |
Sends a POST request to the specified URL. A body may be sent with the request, with a default mediaType of text/plain |
http.put |
Sends a PUT request to the specified URL. A body may be sent with the request, with a default mediaType of text/plain |