DebugDisable Cover

S: DebugDisable, Turn off all Debug Logs in Runtime

You might missed to edit out some Debug Logs or forgot about them when exporting your Game. To make sure they wont impact your Game in Runtime you can Disable the unityLogger on Startup

Disable Debug Log to save Performance in Runtime


					using UnityEngine;

public class DebugDisable : MonoBehaviour
    void Awake()
<a href="">if</a> UNITY_EDITOR
        Debug.unityLogger.logEnabled = true;
<a href="">else</a>
    Debug.unityLogger.logEnabled = false;
<a href="">endif</a>

Drag the Script on a GameObject inside the Scene that gets loaded on Startup. This will Disable the Debug unityLogger whenever the Build is different then the Unity Editor. So in Runtime the unityLogger should be disabled and no longer impact your Game Performance.

Happy Development <3

Leave a Reply

Your email address will not be published.