yasirkula / UnityIngameDebugConsole

A uGUI based console to see debug messages and execute commands during gameplay in Unity
MIT License
2.11k stars 221 forks source link

"Hidden" F12 mode #27

Closed klootas closed 3 years ago

klootas commented 3 years ago

Currently (as I understand it), the console must be visible in order for logs to be collected. I would love to have a built-in "hidden" mode where the console is logging messages but remained hidden until the user presses a key to show it (much like the F12 tools in your browser).

This way games can be released having the console active but invisible and when people have issues you tell them to press F12 and send you the console output to go with their bug report.

Thanks for this great asset!

yasirkula commented 3 years ago

You can put an IngameDebugConsole instance at the first scene of your project with the following settings:

settings

klootas commented 3 years ago

Thanks, but I'm looking for the flexibility to sometime toggle between minimized and console, and sometime toggle between popup and console.

Unfortunately enablePopup, startMinimized and startInPopupMode are private so I can't update these values through my own code (without breaking compatibility with future updates of your asset). The only way I can do this now is to have two instances of your prefab (configured for each scenario) and enable/disable them individually.

yasirkula commented 3 years ago

You can use the ShowLogWindow and ShowPopup functions but you'll still need to modify DebugLogManager.cs slightly because when enablePopup is disabled at startup, popupManager.gameObject.SetActive( enablePopup ); will deactivate the popup in Start function. You'll need to reactivate this GameObject when you want to start showing the popup.

I guess a few lines of code modification should be fine, it is memorable and I don't really update the plugin that often.

klootas commented 3 years ago

Sure thing, thanks!