Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Jahro Console - a new Visual Debug Tool

Discussion in 'Assets and Asset Store' started by jahro-support, Jul 6, 2020.

  1. jahro-support

    jahro-support

    Joined:
    Jul 6, 2020
    Posts:
    1


    Jahro Console is a brand new plugin for Unity 3D. It strives to provide an amazing development experience by an opportunity to use the console for executing commands in a Unity Editor directly or in a build of an app on a target device.


    Jahro Console plugin is designed for different platforms:
    • Mobile devices - Launch runtime console in a game.
    • Desktop platforms - Mac/Windows.
    • Unity Editor - Use console for any project debug.


    How it works:
    • Install a plugin in your project
    • Add custom Jahro Commands to use during runtime.
    • Launch a project in the UnityEditor or on a target platform.
    • Press the Tilde button in the Editor/Desktop build or four-tap on a mobile device to launch Jahro Console.

    Example Jahro Command:

    Code (CSharp):
    1. [JahroCommand("easy-peasy")]
    2. public static void EasyPeasyExample()
    3. {
    4.      //insert your awesome code here
    5. }


    Check User Guide to get more examples!

    Tricks:
    • Extremely easy to use.
    • Undemanding to resources.
    • Developer-friendly grouping of commands.
    • UX-friendly for everyone: Console and Visual operating modes.

    Requirements:

    Jahro makes business with Unity 3D software versions: 2019.3.14f1 and higher.
    TMPro plugin required.


    Features:
    • No scene modification required.
    • Ready to go after package install.
    • Undemanding to resources and light as a feather.
    • Access to 10 recent commands.
    • No deadly cut off for a particular build.
    • Forever alone (or call it single) attribute commands.
    • Flexible and separated project and user settings.
    • Access to history: entered commands for Console mode and parameter value for Visual mode.
    • Convenient work with Enums in Visual mode.
    • Possibility to select Assemblies as commands source easily.
    • Easy removal from a build without any harm and stress.
    • Total customization freedom and anarchy.

    Whatever happens, better call Jahro Console!

    Visit jahro.io to find more!
     
    IggyZuk likes this.
  2. IggyZuk

    IggyZuk

    Joined:
    Jan 17, 2015
    Posts:
    43
    Excellent console. Thank you for making it!

    I had a question about parameters.

    Let's say I want to add God Mode command like this:

    Code (CSharp):
    1. [JahroCommand("god-mode")]
    2. public static void GodMode(bool active = true)
    3. {
    4.    Variables.godMode = active;
    5. }
    Calling god-mode true makes you invincible.
    Calling god-mode false makes you a mere mortal.

    All works as expected.

    Now if we call god-mode without any arguments, I would expect it to use the default value, and essentially call god-mode true, but instead, we get an error:
    Okay, so we could make a GodMode function overload with no arguments, but now we'll have two identical names inside the visual part of the console.

    Speaking of boolean commands, wouldn't it be nice to toggle them when you don't pass an argument? Maybe with nullable types, I know they're not supported, but here's an idea:

    Code (CSharp):
    1. [JahroCommand("god-mode")]
    2. public static string GodMode(bool? active)
    3. {
    4.     Variables.godMode = active ?? !Variables.godMode;
    5. }
    ---

    There's also an issue with the boolean toggles in the visual console.

    Let's say that god mode is on, and I go into the visual console, tap on the god-mode command and the toggle is showing the off graphics. If I submit the command as is, it will use the previous value and set god-mode on again. A little confusing.

    That's about it. What do you think? :)
     
  3. crysberryteam

    crysberryteam

    Joined:
    Aug 24, 2017
    Posts:
    2
    Hi IggyZuk

    First of all thank you for the feedback.
    We looked into this issue deeply, and here is our comments.

    You’re right, in your described case it has place to be. However, as you may know, Jahro Console supports commands overload for Console Mode. Let me show an example:

    Code (CSharp):
    1. [JahroCommand("example", "Overloading methods example", "Overload")]
    2. public static string Example()
    3. {
    4.     return "Yeap, this is simple methods";
    5. }
    6.  
    7. [JahroCommand("example", "Overloading methods example", "Overload")]
    8. public static string Example(string value)
    9. {
    10.     return "Yes, this is a string: " + value;
    11. }
    12.  
    13. [JahroCommand("example", "Overloading methods example", "Overload")]
    14. public static string Example(float value)
    15. {
    16.     return "Great, got a float value here: " + value;
    17. }
    This is overloading for “Example” method. In console, this methods works like this:



    So basically speaking, yeah, we suggest to have to different methods for such cases.
    However, in new Version 2.2 (released by 20 of November) we come up with a solution of how to fine-tune such case. Now the default value for parameters will be placed as a default value in Parameters View in Visual Mode. So in your case, you will have God Mode command with turned by default toggle. And of course, commands submitted with any value, will be set as default for the next time.

    Moreover, for Console Mode in this new version, we’ve added parameter type tips in Autocomplete. Now you can see what type of parameter is accepted by a command. Please see an example below:



    Hope this will help you, and wouldn’t confuse anymore.

    Thank you for pointing on this issue, and for your feedback.

    BTW, The issue with boolean toggle is also has been fixed, check out our new version which is already available on the AssetStore. Also, you can find Monobehaviour commands support in the new version. Cheers.
     
  4. IggyZuk

    IggyZuk

    Joined:
    Jan 17, 2015
    Posts:
    43
    Ah, thanks for the details.

    Great update, and fixed! I really like the visible parameters in Console Mode. Unfortunately, the duplicate commands in the Visual Mode are still there and make it confusing to know which parameters they use. It forces you to click around until you find the correct one.

    Screenshot 2020-11-20 at 4.46.22 pm.png

    With multiple commands, each having 2-3 overloads it will greatly pollute the Visual Mode. Perhaps adding the parameters to Visual Mode would solve this issue?

    Thanks!
     
  5. crysberryteam

    crysberryteam

    Joined:
    Aug 24, 2017
    Posts:
    2
    Thank you for the comment. Yes, it's gonna be solved in next release. Stay tuned
     
    IggyZuk likes this.
  6. IggyZuk

    IggyZuk

    Joined:
    Jan 17, 2015
    Posts:
    43
    Thanks!

    I also wanted to mention the fact that Jahro console utilized the Resources folder, it makes it difficult to take it out from the release build. I would be fine with keeping it in but the amount of fonts is a little excessive in my opinion, which adds a solid 4MB to the build size.

    Maybe reducing it to one, or letting the user pick an existing font would be better? :)
     
  7. garytencent

    garytencent

    Joined:
    Mar 10, 2020
    Posts:
    2
    please support property, field
     
  8. SixDimensional

    SixDimensional

    Joined:
    Nov 6, 2015
    Posts:
    4
    Does this work on the Hololens 2?
     
  9. peyman1959

    peyman1959

    Joined:
    Mar 31, 2018
    Posts:
    2
    Hi
    I got some errors after importing jahro to Unity 2021.3.22

    Code (CSharp):
    1. Assets\JahroConsole\Runtime\View\Behaviours\ConsoleWindowOutputBehaviour.cs(12,12): error CS0246: The type or namespace name 'FilterTogglesBehaviour' could not be found (are you missing a using directive or an assembly reference?)
    2.  
    3. Assets\JahroConsole\Runtime\View\Behaviours\ConsoleWindowOutputBehaviour.cs(10,10): error CS0246: The type or namespace name 'JahroCommandsDataSource' could not be found (are you missing a using directive or an assembly reference?)
    4.  
    5. Assets\JahroConsole\Runtime\View\Behaviours\ScaleControlBehaviour.cs(19,26): error CS0246: The type or namespace name 'CanvasScalingBehaviour' could not be found (are you missing a using directive or an assembly reference?)
    6.  
    7. Assets\JahroConsole\Runtime\View\Behaviours\ScaleControlBehaviour.cs(17,17): error CS0246: The type or namespace name 'CanvasScalingBehaviour' could not be found (are you missing a using directive or an assembly reference?)
    8.  
    9. Assets\JahroConsole\Runtime\View\ConsoleMainWindow.cs(24,18): error CS0246: The type or namespace name 'CanvasScalingBehaviour' could not be found (are you missing a using directive or an assembly reference?)