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

[RELEASED] DevConsole 2: The best way to monitor and communicate with your game

Discussion in 'Assets and Asset Store' started by Cobo3, Oct 24, 2016.

  1. AndreasO

    AndreasO

    Joined:
    Sep 25, 2012
    Posts:
    90
    I second that. Would also like to have this feature.
     
  2. Cobo3

    Cobo3

    Joined:
    Jun 16, 2013
    Posts:
    66
    During the beta, and even during the previous version, some people requested to have the Enter key also select the current item in the AutoComplete window, so I cannot undo that feature.

    However, I can just add that as an additional option that can be toggled on/off. I'll make sure to add it in the next patch comming next week.
     
  3. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    That's a perfectly reasonable solution =) . Thanks!
     
  4. Cobo3

    Cobo3

    Joined:
    Jun 16, 2013
    Posts:
    66
    I hadn't really payed attention to this issue before, but exceptions thrown inside commands should indeed be shown instead of the TargetInvocationException.

    This is currently a bug that wil be fixed in the next version comming this week.
    Thanks for the feedback!
     
  5. Cobo3

    Cobo3

    Joined:
    Jun 16, 2013
    Posts:
    66
    The new version has been submited. It should be live within the next few days
     
  6. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Hi ! I am having trouble making this work. This is my script :

    Code (CSharp):
    1. using UnityEngine;
    2. using SickDev.CommandSystem;
    3.  
    4. public class SmartConsole: MonoBehaviour {
    5.    
    6.     void OnEnable() {
    7.         DevConsole.singleton.AddCommand(new ActionCommand<int>(IncreaseMoney) { className = " Smart" });
    8.         Debug.LogWarning("Initialize Game Console");
    9.     }
    10.  
    11.     void IncreaseMoney(int amount)
    12.     {
    13.         //GameManager gameManager = GameObject.FindObjectOfType<GameManager>();
    14.         //gameManager.increaseMoney(amount);
    15.         Debug.LogWarning("Money increased by: " + amount);
    16.     }
    17. }
    I have noticed that OnEnable is executed twice for some reason. I have attached the script on a dedicated gameObject inside the scene, which I am calling GameConsole.

    Nothing happens when I execute "Smart.IncreaseMoney 10000". Also, it shows multiple times on the autocomplete and I can't think why this would happen :/

    Moreover, it seems like the script is not recognizing my global scripts, like GameManager as you see in this case. I am getting an error if i uncomment this line. Any ideas how I can resolve the issues ? Thanks a lot !
     
  7. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Hmm, I was able to magically have this fixed by moving the GameObject from my Home Scene to me Preload scene. Not sure exactly why, but it works now :D
     
  8. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    93
    Just upgraded, very nice!

    Setting the key shortcuts for history and autocomplete to 'none' seems to have weird effects. If History is set to 'none' the history window is already open when the console is opened; setting autocomplete to none seems to break the windows display. I'm using Unity 2017.4.1.

    I use the F keys in game, and don't really need a key for history and autocompete (as works with tab anyway).

    Other than that, love it!
     
  9. Cobo3

    Cobo3

    Joined:
    Jun 16, 2013
    Posts:
    66
    Absolutely! I Didn't think about that...
    A fix has been made and a new version is on the way.

    Thank you very much for your valuable feedback
     
  10. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    93
    Updated and works fine! Did overwrite my settings though, is there a way to prevent that?
     
  11. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Asset works great!
    I am noticing a bug in Unity 2018.2:

    Assets/Plugins/DevConsole/CommandSystem/CommandSystem-Unity/BuiltInCommandsBuilder.cs(428,32): error CS0619: `UnityEngine.MasterServer' is obsolete: `The legacy networking system has been removed in Unity 2018.2. Use Unity Multiplayer and NetworkIdentity instead.'
     
  12. Cobo3

    Cobo3

    Joined:
    Jun 16, 2013
    Posts:
    66
    Yeah, thanks for letting me know. I just uploaded a patch which should be available for download soon.

    I'll make sure to download beta releases of Unity so that this kind of bugs are fixed in advance.
     
  13. abhuva

    abhuva

    Joined:
    Dec 23, 2011
    Posts:
    76
    Using the latest Unity version 2018.2.2f1 - freshly installed dev console 2, just included the prefab in a scene, started the game, opened the console, input anything (tried with "help", and random strings) --> it always results in an immidiate crash of unity.
    No error messages or anything, Unity stops responding, after a while it closes down, tries to find a solution and in the end offers only to report a bug.
    I hope this can be solved, i was using the old DevConsole in numerous projects and it was always working flawless.
     
    Last edited: Aug 5, 2018
  14. Cobo3

    Cobo3

    Joined:
    Jun 16, 2013
    Posts:
    66
    I'll take a look into the issue with the latest Unity version.

    Thanks for reporting the bug
     
  15. Graticule

    Graticule

    Joined:
    Nov 29, 2017
    Posts:
    6
    What is the best way to disable the plugin for my final release because I don't want it to reduce my game's performance when it's in production. Is it best to just remove the DevConsole folder prior to the build?
     
  16. Cobo3

    Cobo3

    Joined:
    Jun 16, 2013
    Posts:
    66
    I'm currently working on a system to allows just that without extra setup from part of the developers, that way you can forget about everything. I guess I can have it available for the next update. I'll make sure to let you know when the feature is ready!

    As for now, I'd say turning off the "auto instantiate" option is the best choice. You also have to make sure no other code is called in regards to the DevConsole.
     
  17. greymag

    greymag

    Joined:
    Oct 2, 2017
    Posts:
    6
    Hi. I need to have quotes in string argument for command, but it has been remove on parsing.

    Execute command
    Run "Play('animation')"

    Expected: method Run got argument Play('animation')
    Got: method Run got argument Play(animation)

    Same behaviour with command
    Run 'Play("animation")'

    Can you please help me?
     
  18. Cobo3

    Cobo3

    Joined:
    Jun 16, 2013
    Posts:
    66
    Sure, I saw the issue on the github repository of the CommandSystem. I fixed it, but I still intend on patching a couple more things before updating the asset.

    If it's a matter of life and death, you can just compile the CommandSystem code yourself into a .dll; or send me an email so I can send you the patched .dll.
     
    greymag likes this.
  19. Justin-Wasilenko

    Justin-Wasilenko

    Joined:
    Mar 10, 2015
    Posts:
    103
    Any updates on this?
     
  20. vampir26

    vampir26

    Joined:
    Mar 29, 2010
    Posts:
    108
    DevConsole 2 is no longer working in Unity 2020.1 by unknow reason.

    The DevConsole.cs script cannot be loaded by Unity. I determine Unity can't recognize the class inside the namespace. I tried different things do fix it. Now, I get no errors anymore, but the console won't open and DevConsole.singletion is null.

    Hope you can fix it.
     
  21. vampir26

    vampir26

    Joined:
    Mar 29, 2010
    Posts:
    108
    I found a solution:
    Just delete the first small class in DevConsole.cs

    Access the DevConsole by SickDev.DevConsole.DevConsole.singleton
     
    Egnech, unity_xbT3riAS2jKA0g and deab like this.
  22. RoyBarina

    RoyBarina

    Joined:
    Jul 3, 2017
    Posts:
    98
    Hi
    DevConsole is awesome :) I love it so far!
    I have a small issue though..
    After upgrading to 2021.3.1 from 2020.3.32 I am now very busy fixing issues o_O one of them is DevConsole crashing the app shouting "Crash!!!" in Player.log.

    Last few lines from the stack trace are: (I've removed some obfuscated stuff..)
    Code (csharp):
    1.  
    2. ========== OUTPUTTING STACK TRACE ==================
    3.  
    4. (GameAssembly) [C:\Program Files\Unity\2021.3.1f1\Editor\Data\il2cpp\libil2cpp\vm\Type.cpp:1263] il2cpp::vm::InvokeDelegateConstructor
    5. (GameAssembly) [C:\Program Files\Unity\2021.3.1f1\Editor\Data\il2cpp\libil2cpp\vm\Type.cpp:1327] il2cpp::vm::Type::ConstructDelegate
    6. (GameAssembly) [C:\Program Files\Unity\2021.3.1f1\Editor\Data\il2cpp\libil2cpp\icalls\mscorlib\System\Delegate.cpp:36] il2cpp::icalls::mscorlib::System::Delegate::CreateDelegate_internal
    7. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\mscorlib7.cpp:14148] Delegate_CreateDelegate_internal
    8. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\mscorlib7.cpp:15278] Delegate_CreateDelegate
    9. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\mscorlib7.cpp:15354] Delegate_CreateDelegate
    10. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\mscorlib7.cpp:15374] Delegate_CreateDelegate
    11. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\CommandSystem.cpp:11891] MethodInfoCommand_MakeDelegate
    12. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\CommandSystem.cpp:11759] MethodInfoCommand__ctor
    13. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\CommandSystem.cpp:9044] CommandsBuilder_BuildMethods
    14. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\CommandSystem.cpp:8123] CommandsBuilder_Build
    15. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\DevConsole1.cpp:9705] BuiltInCommandsBuilder_Cursor
    16. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\DevConsole.cpp:9727] BuiltInCommandsBuilder_Build
    17. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Assembly-CSharp.cpp:22] VirtualActionInvoker0::Invoke
    18. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\DevConsole.cpp:14567] DevConsole_CreateCommandsManager
    19. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\DevConsole.cpp:13842] DevConsole_get_commandsManager
    20. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\DevConsole.cpp:18524] DevConsole_AddCommand
    21. (GameAssembly) [D:\MyGame\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Ball1.cpp:24809] Program_RegisterCommands // <- a call to register commands in my code
    22. . . .
    23. . . .
    24. . . .
    25.  

    Since I call "Register" on start, the app crashes immediately. but only when I build it with IL2CPP code generation set to "Faster runtime" in build settings (Editor version 2021.3.1)
    Maybe it has something to do with Scripting Restrictions?
    A fix or workaround would be awesome :)