Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Utilities Quantum Console: The Ultimate in Game Development Console

Discussion in 'Tools In Progress' started by QFSW, Sep 26, 2018.

  1. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Not quite. You could write a new Action that converts a Coroutine into an action, similar to the included Await action, but thats not the same as being natively supported. I don't think coroutine command will ever be natively supported (without extra boilerplate) due to the signature only being IEnumerator as above (I try not to have QC make any ambiguous decisions). Perhaps a [CoroutineCommand] attribute could be added in the future? Not sure. Coroutine commands also can't natively be executed by the "processor" (the core of QC itself) since you need MonoBehaviours for coroutines

    EDIT: sorry misread as you asking if coroutine commands are supported. Coroutine wait is not yet but should be in the future, shouldn't be too hard to add
     
  2. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.4.1 is now live featuring clickable suggestions!
     
  3. HaojieSherlock

    HaojieSherlock

    Joined:
    Mar 7, 2018
    Posts:
    2
    Hi I have some problems.
    I replaced it with a unity new input system and add EventInputSystem then run DemoScene.
    input demo.robot.kill Something went wrong
    unity version : 2019.4.13

    qc : 2.4.1



    Q:\>Quantum Console Processor is initialising
    Q:\>Table generation under progress
    Q:\>139 commands have been loaded<color=#00FF00>
    Q:\>Quantum Console Processor ready</color>
    <color=#00FFFF>> demo.robot.kill</color>
    Please select a robot
    <color=#00FF00><color=#F799FF>Robot 1</color> [x]</color> <color=#F799FF>Robot 2</color> [ ] <color=#F799FF>Robot 3</color> [ ]
    <color=#FF0000>Error (System.ArgumentOutOfRangeException): Specified argument was out of the range of valid values.
    Parameter name: key
    at UnityEngine.InputSystem.Keyboard.get_Item (UnityEngine.InputSystem.Key key) [0x0001e] in /Users/sherlock/unity-work/IndependentGame/Library/PackageCache/com.unity.inputsystem@1.0.0/InputSystem/Devices/Keyboard.cs:1940
    at QFSW.QC.InputHelper.GetKeyDown (UnityEngine.KeyCode key) [0x00001] in /Users/sherlock/unity-work/IndependentGame/Assets/Plugins/QFSW/Quantum Console/Source/Scripts/InputHelper.cs:32
    at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate, System.Boolean& found) [0x0003f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
    at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
    at QFSW.QC.Actions.GetKey.GetCurrentKeyDown () [0x00001] in /Users/sherlock/unity-work/IndependentGame/Assets/Plugins/QFSW/Quantum Console/Source/Scripts/Actions/GetKey.cs:38
    at QFSW.QC.Actions.GetKey.get_IsFinished () [0x00001] in /Users/sherlock/unity-work/IndependentGame/Assets/Plugins/QFSW/Quantum Console/Source/Scripts/Actions/GetKey.cs:23
    at QFSW.QC.ActionExecuter.Execute (System.Collections.Generic.IEnumerator`1[T] action, QFSW.QC.ActionContext context) [0x00043] in /Users/sherlock/unity-work/IndependentGame/Assets/Plugins/QFSW/Quantum Console/Source/Scripts/Actions/Core/ActionExecuter.cs:39
    at QFSW.QC.Actions.Composite.get_IsFinished () [0x00000] in /Users/sherlock/unity-work/IndependentGame/Assets/Plugins/QFSW/Quantum Console/Source/Scripts/Actions/Composite.cs:13
    at QFSW.QC.ActionExecuter.Execute (System.Collections.Generic.IEnumerator`1[T] action, QFSW.QC.ActionContext context) [0x00043] in /Users/sherlock/unity-work/IndependentGame/Assets/Plugins/QFSW/Quantum Console/Source/Scripts/Actions/Core/ActionExecuter.cs:39
    at QFSW.QC.QuantumConsole.ProcessActions () [0x00054] in /Users/sherlock/unity-work/IndependentGame/Assets/Plugins/QFSW/Quantum Console/Source/Scripts/QuantumConsole.cs:660 </color>
     

    Attached Files:

    Last edited: Nov 5, 2020
  4. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Hi, I received your bug on the issue tracker and have fixed it https://bitbucket.org/QFSW/quantum-console/issues/132/systemargumentoutofrangeexception
    If you would like a fix before it goes live, please DM me with an invoice number

    Sorry about the issue, how have you been finding QC otherwise? Hope you've been enjoying :)
     
  5. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    An introduction and tutorial video for Quantum Console is now finally here!
     
  6. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
  7. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
  8. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    929
    I played with your demo and i am impressed.

    What would be the fastest way to acess this Unity Volume Standard overides

    e.g. for
    • Ambient Occlusion overide from Volume Profile "Render Settings Exterieur"
    enable/disable

    enable/disable Raytracing

    Unbenannt.JPG

    All i all i search a fast way to toggle all these volume overiddes from different volumes.
    And i have a lot of them in the scene.

    Probably you have an little example or an tip for a generic way?

    I found a little issue in your downloadable Demo:
    When you set different resolutions.
    The resizeable console window becomes sometimes not resizeable anymore.
     
    Last edited: Nov 19, 2020
  9. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Hi @keeponshading

    Since you can't modify the post processing volume to add the command directly there your best option is probably to write a static command that changes the settings on the object of your choice. I would then make for example the name of the object an argument to your command, which can then be grabbed from some kind of database or system that you manage. Please let me know if I've missed the question or if you need anything else

    As for the demo issue, do you mean in a standalone build, the editor, or in WebGL? If for a standalone build, is it one that you built yourself or where did you get it from? I'll try to reproduce it so it would be useful to know in which contexts it happens
     
  10. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Quantum Console is 50% OFF as part of the new years sale!
     
  11. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.4.4
    Bug Fix 0053: Fixed a bug where the max log lines setting would not work properly
     
  12. davidisak

    davidisak

    Joined:
    Nov 16, 2014
    Posts:
    3
    Hi! I'm looking at buying this plugin but have a question regarding the console prompts. Is it possible to set it up so that it shows available enum values for a command. If I for example have a spawn command I would like to type "spawn " and then have it show hints on all available enum values for example that can be used for the spawn command?
     
  13. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Unfortunately not as this requires "contextual autocomplete" as the suggestions will be dependent on the command that is being typed, you can track the issue for it here https://bitbucket.org/QFSW/quantum-console/issues/91/contextual-autocomplete
    One of the reasons this is difficult is QC doesn't know what command you're typing until you've actually finished typing it

    Not ideal but there is a work around, there's an included command enum-info<T> which gives you all the names and values for a given enum type, which you could use before invoking your command to get a list?

    Let me know if I can help with anything else :)
     
  14. davidisak

    davidisak

    Joined:
    Nov 16, 2014
    Posts:
    3
    Alright! Is it possible to set up/register commands dynamicly so that I could register all enum values to separate commands such as spawn.enemy1, spawn.flower etc?
     
  15. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    It's possible but not really that easy (it's more an internal API that I opened up to public usage on request) however I think making dynamic commands easier to generate would definitely be something to add to the todo list since there is potential there

    Currently you have to use this TryAdd method which takes a CommandData, something that was never really designed for public use and certainly needs refactoring https://qfsw.co.uk/docs/QC/api/QFSW...eProcessor_TryAddCommand_QFSW_QC_CommandData_

    I would add that you could use macros which would be much easier to generate but unfortunately macros do not have autocomplete either :(
     
  16. davidisak

    davidisak

    Joined:
    Nov 16, 2014
    Posts:
    3
    Okey! Thanks for the very quick replies, we will buy the asset as we can work with manually typing in enums for now and hopefully the plugin gets support for autofilling it later in some way :)
     
    QFSW likes this.
  17. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Thanks! Please let me know what you think as I always want to improve QC :) Follow the issue if you want updates on the contextual autocomplete
     
  18. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,471
    Humm.. I have forgotten, or at least could not find again if there was ever an option to control time.scale value upon opening the console window... or was there?
     
  19. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    It's not quite built in, but you can subscribe to the OnActivate and OnDeactivate events and add the time scale change there
     
  20. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,471
    So I assume that it is setting the time scale to 0 as a default?
     
  21. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    QC does not change the time scale, but automatic support for this is on the list. If it's going to 0 you must have some callback code that's doing so
     
  22. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    I have some big news for everyone regarding QC!
    I'm rolling out what we can call the Private Open Source program for QC!

    What does that mean?
    Lots of members of this community have already contributed/helped in various ways and open sourcing QC would really help streamline the entire process, but for obvious reasons I can't make it accessible for everyone. With this I can give source access to registered customers

    Why would I want to join?
    If you want to be able to contribute changes directly to QC, have access to the latest source and bug fixes or just want to join the discussion this is a great way

    How do I join?
    Fill out this form and I'll be contacting you
    https://forms.gle/sGphnve6DYirgxah9
     
    Last edited: Mar 9, 2021
  23. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.4.5
    Change 0056: The OnLog event now receives an ILog, containing both the log text and type
    Bug Fix 0054: Fixed a bug where destroyed objects were not removed from the registry
     
  24. LavaPatrik

    LavaPatrik

    Joined:
    Feb 21, 2017
    Posts:
    12
    We're having trouble mapping your console to the standard console button


    https://wiki.unvanquished.net/images/9/96/Tilde_key.svg

    We can't seem to manage to make it behave the same (actually be a button on the same location on the keyboard) across PC/Mac/Linux. Can you give us any pointers?
     
  25. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    That key is actually different between UK/US keyboards (on mine it is ` for non shift, ¬) so I'm not actually able to test it here. Try the key "Back Quote"
     
  26. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.4.6 is now here, and commands declared in generic classes is now supported! This means the following
    Code (CSharp):
    1. public class GenericClass<T>
    2. {
    3.    [Command("test")]
    4.    private static T TestReturn(T t) { return t; }
    5. }
    is now supported, and produces the following command signature
    Code (CSharp):
    1. test<T>
    Full release notes here
     
  27. LavaPatrik

    LavaPatrik

    Joined:
    Feb 21, 2017
    Posts:
    12
    "Back Quote" seems to work on windows but its a completely different button on Mac. I understand that keyboard layouts vary between countries and hardware, but what I'm after is the same key location (the one above tab). Most of the game classics (and for that matter newly produced games as well) seem to use this button on all languages/hardware, and its usually referred to as the "Console button".
     
  28. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    QC uses Unity's input system and key codes for the key bindings. If there's no key code that gets the consistent behaviour you want (which it seems the case if it works on Windows but not mac?) then I'm afraid the "key" you want isn't something that's recognised or understood by Unity

    In this case I would recommend that you write a small script that checks for the input as you want (including any regional/OS differences) and then invoke the .Toggle function
    Code (CSharp):
    1. [RequiresComponent(typeof(QuantumConsole))]
    2. public class InputBinder : MonoBehaviour
    3. {
    4.     private QuantumConsole _qc;
    5.  
    6.     private void Awake()
    7.     {
    8.         _qc = GetComponent<QuantumConsole>();
    9.     }
    10.  
    11.     private void Update()
    12.     {
    13.         if (/* check for your key here */)
    14.         {
    15.             _qc.Toggle();
    16.         }
    17.     }
    18. }
    Let me know if you need any more help. How have you been finding QC?

    EDIT: are you using the old or new input system?
     
    Last edited: Apr 20, 2021
  29. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.4.7
    Bug Fix 0057: Console display will no longer incorrectly parse rich tags from invoked command
    Bug Fix 0058: Generic class commands now still work when the command method has overloads
     
  30. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    @Jakub-Slaby made a pretty neat extension for Quantum Console that I recommend you all check out! It adds some pretty cool new features like log stacking, filtering and searching

    You can try out the package here: https://github.com/JakubSlaby/Chirp-QuantumConsole
    It's also integrated with his Chirp logging system for some extra features, so you can try that here: https://github.com/JakubSlaby/Chirp

    Last but not least, installation help:

    Let either of us know if you have any feedback!
     
  31. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.5.0 is live with some new
    http
    commands!
    Full release notes here
     
  32. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.5.1
    Addition 0118: Included SRP friendly prefab and theme variants: 'Quantum Console (SRP)' and 'Default Theme (SRP)'
    Bug Fix 0061: Fixed a case where loggers could initialize too late causing errors when initialize on startup is disabled
     
  33. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
  34. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.5.2
    Addition 0118: Added maximum log size setting to prevent huge logs from crashing the console
    Change 0062: Default prefab now has a maximum log count of 1024 logs
    Bug Fix 0062: Fixed grammar in error message for when there are no invocation targets
     
  35. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Unity has decided to put Quantum Console back on sale for the Sci-fi Strikes Back theme of the Smash Hit Summer Sale! Get it while you can!
     
  36. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.5.3
    Addition 0120: New core command: max-logs
    Change 0063: QC will now ignore compiler generated types during table generation resulting in faster load times
    Bug Fix 0063: Fixed a native crash that would occur under IL2CPP with GeNa installed
     
  37. BlueDev5

    BlueDev5

    Joined:
    Dec 24, 2019
    Posts:
    23
    Hey QFSW, the console is great. I was learning about attributes and i just wanna know how many milliseconds does it costs your console to scan all assemblies?
     
    QFSW likes this.
  38. BlueDev5

    BlueDev5

    Joined:
    Dec 24, 2019
    Posts:
    23
    the best i thought was to deploy a thread and while scanning if the assembly name has certain words like UnityEngine, UnityEditor, System, nunit then skip the assembly coz its a pre-compiled lib so it wont have the attribute. btw it takes like 2 millisecons per type
     
  39. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Yeah I use this exclusion list where I skip assemblies that are from Unity, C# etc to improve performance. Being precompiled doesn't necessarily mean no commands however
     
  40. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Would you want a number for all assemblies or per type? It depends on quite a few things like whether you do the scan in async or not, how many cores you have, how big your project is etc.
     
  41. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.5.4
    Addition 0121: Console zoom can now be triggered with hotkeys (default: ctrl+ and ctrl-)
    Addition 0122: Hotkey for dragging the console is now configurable (default: shift click)
    Addition 0123: AreActionsExecuting added to query if the console is currently executing actions
    Change 0064: Optimised input handling under new input system
    Bug Fix 0064: Fixed bug where speechmarks were not parsed properly for GameObject arguments
     
  42. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Got something new to show off! The highly demanded contextual autocomplete is finally here! This will debut in V2.6.0 to support improved command completion, enum suggestions and macro autocomplete. Watch this space as more improved suggestions will be added over time using the overhauled system!
     
  43. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Some news regarding Quantum Console!

    Quantum Console V2.6.0 has just landed with some pretty big improvements, including the complete overhaul of the autocomplete system! This time however you won't be able to see the update to QC in the store or package manager through the normal means because QC has actually moved listing on the store and now lives here, with a major upgrade route: https://assetstore.unity.com/packages/tools/utilities/quantum-console-211046

    If you purchased QC less than 9 months ago then you will be able to upgrade to V2.6.0 for free! And continue receiving future updates for free like normal

    If you purchased QC more than 9 months ago then you can upgrade to V2.6.0 for a one time small price of $10. This will give you V2.6.0 as well as free future updates to QC. This upgrade cost helps to keep it sustainable for me to support all of my old users and helps me keep making new updates for QC.

    What if I bought QC over 9 months ago and don't want to upgrade?
    You can still continue to use QC V2.5.4 as you did before, and you will never lose access to this version. You just wont be able to get newer updates

    Addition 0124: New user extendable contextual autocomplete system
    Addition 0125: New user extandable suggestion filtering system
    Addition 0126: Macros can now be autocompleted
    Addition 0127: Enum parameters can now be autocompleted
    Addition 0128: GameObject/Component parameters can now be autocompleted
    Addition 0129: Enum parameters can now be autocompleted
    Addition 0130: bool parameters can now be autocompleted
    Addition 0131: New suggestor tag system
    Addition 0132: New suggestor tag: [command-name]
    Addition 0133: New suggestor tag: [scene-name]
    Addition 0134: Autocomplete can now be disabled entirely if desired
    Addition 0135: The KeyConfig in use can now be changed at runtime via C#
    Addition 0136: The command log format can now be configured from the QuantumTheme
    Change 0064: Command arguments for the current suggestion will be displayed as you type
    Change 0065: built in scene commands now use [scene-name] for improved autocomplete
    Change 0066: Optimised text generation and coloring
    Change 0067: Optimised QuantumConsoleProcessor.GetAllCommands/GetUniqueCommands
    Change 0068: Optimised macro expansion
    Change 0069: load-scene command can now be used on scenes not in the build list (editor only)
    Bug Fix 0065: loaded-scenes and get-scene-hierarchy commands now work in when the loaded scenes are not in the build list
    Bug Fix 0066: Fixed the console drag feature not working with the new input system
    Bug Fix 0067: Fixed loaded-scenes failing when multiple loaded scenes are not in the build list
    Bug Fix 0068: Fixed the type serializer incorrectly serializing generic parameter types (such as T)
    Bug Fix 0069: Fixed a bug where overlapping macro definition (such as #a and #ab) would be expanded incorrectly
     
  44. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    V2.6.1 has just landed and now has support for runtime generated commands with the new lambda commands system!
     
  45. Abnormalia_

    Abnormalia_

    Joined:
    Jul 23, 2013
    Posts:
    77
    First of all thanks for the amazing product, bought it a while ago and using it now almost in every project. I have a rather unusual question. I am designing hardcore survival and want to name a computer console interface that simulates primitive os.


    Can I use a rather easy QC as an intermediate to hook my input and receive back and display what commands evaluate?
     
  46. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Hey @Abnormalia_ , super glad to hear you like it!
    I'm not sure I completely follow what you need, do you want to send your input to QC, run the commands, and get back the output?
     
  47. Abnormalia_

    Abnormalia_

    Joined:
    Jul 23, 2013
    Posts:
    77
    Code (CSharp):
    1. inputField.ProcessEvent(Event.KeyboardEvent("a"));
    2.  
    3. inputField.ForceLabelUpdate();
    yes I guess I will try this, to use my "VR PC" keyboard as input and separate camera looking at QC
     
  48. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Let me know how you get on!
     
  49. SceneForgeStudio

    SceneForgeStudio

    Joined:
    Feb 28, 2017
    Posts:
    447
    Hi, I'm considering purchasing Quantum Console and had a quick question before I buy.
    I'm looking to build a system that allows the user to "Script" at runtime using preset commands.
    From my understanding, the asset only allows for individual commands to be typed/executed at once like most dev/cheat consoles.
    But is there a way to have the user write a bunch of commands line after line, then execute them all sequentially on demand?
    Thanks!
     
  50. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,902
    Hey @MidnightCoffeeInc, that somewhat both is and isn't supported
    Currently there is the qc-script-extern command that reads in a list of commands from a file and executes them sequentially, and there is also a function on QuantumConsole that does the same thing when given a list of commands, but there isn't the exact interaction flow yet that you are expecting. You should be able to implement it though :)