Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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,906
    The parser system is now similar to the serialization system in its extensibility, with this it means I've also added support for much more argument types than before
     
  2. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Been working on tweaking the new look for Quantum Console. I've adjusted the shader so that it can blend in a fixed color as an "overlay". Whilst the previous changes to the visuals looked great, they could have legibility issues against very bright or dark backgrounds

    upload_2019-10-5_15-52-56.png

    The shader improvements aim to remedy that by blending in a fixed colour, which should improve how it looks on different backgrounds

    upload_2019-10-5_15-53-48.png

    Nothing is final, so all feedback is welcome. I think this is a good improvement over the original, and I should have a new demo up some time soon
     
  3. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
  4. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    The console can now be dynamically zoomed to fit your preference!
    upload_2019-10-13_10-57-21.png
     
  5. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    QC V2.3.0 will have a singleton interface that is only valid if using the new singleton mode
     
  6. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Brand new command,
    qc-script-extern
    is now here! It allows you to execute an external file of QC script, in which each line is a seperate command The command properly supports async commands in that it will attempt to wait for them to complete before moving on

    for the following QC script


    You can expect this output
    upload_2019-10-26_11-44-59.png

    Would love to hear any feedback on possible improvements!
     
  7. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Hi Everyone! Wanted to get some feedback for a design decision

    At the moment, there are 4
    MonoTargetTypes

    -
    Single

    -
    All

    -
    Registry

    -
    Singleton


    The targets
    Single
    and
    All
    only target active monobehaviours.
    In my personal project I've been working on as of late, I've found myself wanting to use the
    Single

    mode on inactive objects quite a bit I was wondering which of the 3 proposals sounded the best, or if you had something better to suggest about this problem

    1. Change Single (and or All) to include inactive objects

    2. The former, but add a second target to recreate the previous behaviour (
    SingleActive
    for example)


    3. Leave Single and All as they are and add new targets
    SingleWithInactive
    and
    AllWithInactive
    (obviously with better names)
     
  8. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    I've heard you all loud and clear about QC's docs being lacking, so I'm proud to present the completely new documentation! Let me know what you think https://qfsw.co.uk/docs/QC/
     
    airnamics likes this.
  9. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Quantum Console 2.3.3 is now here with a fresh new update and a brand new trailer!

    Code (CSharp):
    1. Brand new documentation: https://qfsw.co.uk/docs/QC/
    2. Change 0045: Improved invocation messages for commands without a return
    3. Change 0046: Improved performance of Single and SingleInactive commands
    4. Addition 0093: New MonoTargetType: SingleInactive
    5. Addition 0094: New MonoTargetType: AllInactive
    6. Addition 0095: Added logging level option and command
    7. Addition 0096: Added TryAddCommand to processor for runtime addition of commands
    8. Bug Fix 0039: Primitive parser now behave correctly on non English locales
    9. Bug Fix 0040: Fixed primitive operators with high stripping level enabled
     
  10. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    The long awaited tabs are under development!
     
  11. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    I've added hotkeys for tabs as well as improved highlighting for the buttons! In doing this I've also improved how QC handles hotkeys so there aren't collisions or false positives

    upload_2020-5-10_10-3-11.png

    Still lots to go! I'd love to hear what you all think
     
  12. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
  13. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Done with a new extra command,
    get-scene-hierarchy
    !
    This utility command allows you render the hierarchy to the console view, perfect for when you're debugging a build and need a quick reference!
    upload_2020-5-25_14-41-51.png
     
  14. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Quantum Console can now be resized at runtime!
     
  15. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
  16. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Little demo of the tab work!
     
  17. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
  18. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
  19. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    V2.3.7 is now live, with native support for the new input system!
     
  20. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
  21. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    I'm proud to present a big new system I've been working on for Quantum Console called actions

    These allow you to write more interactive commands than before that can do a range of things from waiting on conditions to getting user input

    Let's look at an example


    To write it, it's pretty simple: your command must return
    IEnumerator<ICommandAction>
    or
    IEnumerable<ICommandAction>
    and then yield return the actions you want to use
    Code (CSharp):
    1. [Command("action-demo")]
    2. public static IEnumerator<ICommandAction> ActionDemo()
    3. {
    4.     Robot robot = null;
    5.     Robot[] robots = Resources.FindObjectsOfTypeAll<Robot>();
    6.  
    7.     yield return new Value("Please select a robot");
    8.     yield return new Choice<Robot>(robots, r => robot = r);
    9.  
    10.     yield return new RemoveLine();
    11.     yield return new Typewriter("Good choice...");
    12.     yield return new WaitRealtime(1);
    13.  
    14.     robot.Die();
    15.     yield return new Typewriter($"{robot.name} has been killed. Have a nice day :)");
    16. }
    17.  
    Want to make your own Action? Very easy, just implement the following interface and you're good to go
    Code (CSharp):
    1. public interface ICommandAction
    2. {
    3.     void Start(ActionContext context);
    4.     void Finalize(ActionContext context);
    5.     bool IsFinished { get; }
    6.     bool StartsIdle { get; }
    7. }
     
  22. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    476
    Anyway, to have the built in unity console not pop up and instead have the quantum one pop up on Development Builds?
     
  23. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Hi @nsxdavid
    To have QC open on a log, you can use the setting from the inspector upload_2020-8-5_20-1-31.png

    With this API, you should be able to disable the built in one (docs are bit vague if you can use that before the console is enabled and have it hidden. If that's not the case, you could subscribe to the debug log event and disable it after a log appears?)
    https://docs.unity3d.com/ScriptReference/Debug-developerConsoleVisible.html

    Doing both of these should be able to achieve what you want?
    Please let me know if you need anything else and I'd love to hear how you're getting on with QC :)
     
  24. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    I may have gotten carried away and made a whole game as a QC command, for when you're bored of your game ;) All created using actions
     
  25. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Might need to make a new free package, "Games for QC" :p
     
  26. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    And now with texture -> ASCII rendering, the games aren't even limited to text based!
     
  27. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Today is the FINAL day of the Quantum Console sale! This is your last chance to get QC at 50% OFF!
     
  28. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Due to popular demand, the format of the timestamps can now be configured via the Quantum Theme!
    upload_2020-8-13_21-46-20.png
     
  29. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
  30. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Hi, just purchased the asset and been experimenting with it.

    All is good.. except, I honestly with no offense, don't like term Quantum this and Quantum that, on my console. I just want it to be clean console next to my game that don't impose the name Quantum everywhere. I think it is not a good idea to show name that may sound a bit not go with the theme of particular game etc.

    Do you have any plan or idea that we can remove this Quantum mentioning in the Asset? Perhaps a localized text asset that we can modify to customize how default messaging works inside console asset?
     
  31. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Are you talking about the "initialization logs" that occur when you open it or something else? Just because they are the only mention I can think of

    You can disable those entirely from the inspector of the QuantumConsole.cs. If you want to keep those init logs but using a different name I can point you to the right part of the code to modify (and perhaps it might make sense to expose this somehow rather than having it baked in)

    Other than that, how have you been finding it?
     
  32. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Yes please expose them somehow so we can customize them.

    Well, other than the initialization part, it also being mentioned every time we enter command that is not recognized as well.
     
  33. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Ah yes, forgot about that; I'll get an issue raised for it. I'm currently working on wrapping up V2.4.0 so it will have to wait for V2.4.1. In the mean time, assuming you are on V2.3.7

    QuantumConsole.cs
    line 269 (GetTableGenerationText) and line 540 (GetErrorMessage)
     
  34. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
  35. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    There is one more thing as matter of fact. There are couple of fuctions that I would like the console to invoke, but they are Unity Coroutines. Right now, I wrapped them in non static function and it works, but I was wondering if there could be some neat way to handle them like how async does so we can either also block the console while it is running, etc..

    one idea for me right now is block the console manually somehow (if the api already exist) and then unlock them when finished... but that would require some safety check for in case coroutine failes to exit itself for some reason.

    Any ideas on this?
     
  36. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Also, I found that after I set my initial zoom factor and the console size by setting Zoom Magnification and ConsoleRect's values to how I liked and then hidden the console to start with, when you activate the console in runtime, its size and zoom does not apply unless I click on the zoom button again to refresh it.

    Is this a bug? Or am I setting this wrong?
     
  37. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    The reason I don't automatically support Coroutines, like I do with tasks, is because Unity didn't choose a particuarly unique function signature for them (IEnumerator). If I receive an IEnumerator I really don't have a reliable way to tell if it's a coroutine or not

    Alternatively, you could use a tool such as this one (Note: I haven't used this specific one before, but have used others) to allow you to await on coroutines, then your helper function can await on the coroutine wrapping it into a task; from there QC will handle it as normal

    https://forum.unity.com/threads/asyncoroutine-use-coroutine-and-async-await-together.495696/
     
  38. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    That's definitely a bug. I think I have an idea what might be causing it (just forgetting to "dirty" an object somewhere) but will need to investigate. Did a quick test and got the same result as you
    https://bitbucket.org/QFSW/quantum-console/issues/122/changing-zoom-rect-magnification-of
     
  39. ry00n

    ry00n

    Joined:
    Mar 3, 2018
    Posts:
    6
    I'm interested in this asset but from looking through the documentation I noticed it relied heavily on the [Command] attribute

    Is there a straightforward way for someone to rename that attribute? I'm worried it would conflict with Mirror networking which also uses the [Command] attribute. That's the only thing making me hesitant to purchase at the moment. Thanks!
     
  40. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Since it's kept under a namespace (QFSW.QC) theres 2 easy ways to resolve the conflict without having to rename the attribute

    Method 1: Use the full explicit name
    Code (CSharp):
    1. [QFSW.QC.Command("command")]
    2. private static void MyCommand();
    Method 2:
    using = 

    Code (CSharp):
    1. using QCommand = QFSW.QC.Command;
    2. ...
    3. [QCommand("command")]
    4. private static void MyCommand();
    For method 2 you need to do that in each file you wish to use it

    Hope that helps and let me know if you need anything else!
     
    Fossel and ry00n like this.
  41. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    This worked very nicely. As matter of fact, I have learnt to do async coroutine now which is going to be very useful. cheers.
     
  42. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Glad to hear that it worked well, and doubly more so that you learnt something new :)
     
  43. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    I've fixed this for V2.4.1
    If you DM with me an invoice number then I can have a patch sent to you now
     
  44. thomas10_10

    thomas10_10

    Joined:
    Sep 11, 2018
    Posts:
    3
    Hi @QFSW !
    The documentation is well provided, the only problem is that I'm French and I didn't understand how to remove or add a command in real time. Also is it possible to have different quantum consoles that have their own commands (that can't be read by other consoles) ? Thank you!
     
  45. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Hi @thomas10_10, not a problem and always feel free to ask should you need anything :)

    Unfortunately dynamic addition and removal of commands isn't quite possible at the moment. I did make QuantumConsoleProcessor.TryAddCommand public at the request of a user. This is what's used internally, but it probably isn't too helpful as you need a CommandData, which may not be easy or possible to construct in the way you need to. I think in general a large refactoring of how commands work internally is going to be needed before I can properly support it. If it helps, I could probably look at your use case for how you want to add/remove them, then let you know if its possible and help you make the modifications required.

    I'm afraid that's not supported yet either. Do you want to use these consoles at the same time or no? If not, then perhaps once the command groups system is finished (no ETA for that yet) then you could use that to switch groups when switching console?

    Hope that helps and let me know if you need anything else
     
  46. thomas10_10

    thomas10_10

    Joined:
    Sep 11, 2018
    Posts:
    3
    you answer quickly!
    that's exactly the functionality i need! i'll keep an eye on your updates. thanks for your support, very nice day to you!
     
    QFSW likes this.
  47. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    No problem, you too!
     
  48. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    V2.4.0 is now live, with the first official release of actions!
    Full release notes here
     
    zyzyx likes this.
  49. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    A little something is finally here due to popular demand and the initiative of a QC user :)
    really needs a hover state in my opinion but its working
    Suggestions.gif
     
  50. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Is this mean coroutine wait is now supported?