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

stop editor player error #13

Closed yingnierxiao closed 4 years ago

yingnierxiao commented 4 years ago

NullReferenceException: Object reference not set to an instance of an object IngameDebugConsole.DebugLogManager.LateUpdate () (at Assets/3rd_Plugin/Standard Assets/IngameDebugConsole/Scripts/DebugLogManager.cs:314)

NullReferenceException: Object reference not set to an instance of an object IngameDebugConsole.DebugLogManager.ReceivedLog (System.String logString, System.String stackTrace, LogType logType) (at Assets/3rd_Plugin/Standard Assets/IngameDebugConsole/Scripts/DebugLogManager.cs:482) UnityEngine.Application.CallLogCallback (System.String logString, System.String stackTrace, LogType type, Boolean invokedOnMainThread) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Application.cs:121)

yasirkula commented 4 years ago

I think this is an editor-only issue. I'll still fix it in the next release but if it happens in the built player, please let me know so I can prioritize this issue. The fix should be simple: change a boolean to true in DebugLogManager.OnApplicationQuit and skip the DebugLogManager.ReceivedLog function if this boolean is true.

yingnierxiao commented 4 years ago

editor-only. apk or ipa is ok