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

Logs do not appear when Debug.Log() called on async callback and not on main thread. #17

Closed andrewspalato closed 4 years ago

andrewspalato commented 4 years ago

Hello, @yasirkula really love the UnityIngameDebugConsole and your awesome unity plugins, works great, but I have found that logs do not appear in the console if we are using asynchronous callbacks, is there a way to make these visible?

An example of this is using Firebase storage and their ContinueWith() Task callbacks.

The logs appear in adb logcat fine, but I would also like to see them inside the in game console too.

yasirkula commented 4 years ago

I'll try to reproduce the issue by calling Debug.Log in a separate thread, as soon as possible.

yasirkula commented 4 years ago

Can you unzip the attached archive and import the unitypackage inside it to your project? I've updated the plugin and would appreciate it if you could give it a shot before I release the update publicly.

IngameDebugConsole.zip

andrewspalato commented 4 years ago

Thanks! This works but adding static commands will not work in a build from my test.

yasirkula commented 4 years ago

Do you mean the ConsoleMethod attribute? Did it work properly for the previous version? What are your build settings, e.g. IL2CPP, .NET 4.5, ProGuard minification and etc.?

andrewspalato commented 4 years ago

IL2CPP .NET 4.5 Proguard Minify (using user proguard)

LogAllCommands and LogSystemInfo does not exist in DebugLogConsole.

yasirkula commented 4 years ago

This release should fix it: IngameDebugConsole.zip

andrewspalato commented 4 years ago

@yasirkula Thank you! Commands work, debug logs also work async. All works with Proguard enabled too.