Skip to content

Instantly share code, notes, and snippets.

@Fastzargon
Created August 25, 2022 09:43
Show Gist options
  • Save Fastzargon/4434f319389863882edb0cd02fede8c3 to your computer and use it in GitHub Desktop.
Save Fastzargon/4434f319389863882edb0cd02fede8c3 to your computer and use it in GitHub Desktop.
MethodOneMain
using UnityEngine;
public class Example : MonoBehaviour {
private bool debugOn = true;
private void Awake() {
DebuggerSetup();
}
private void DebuggerSetup() {
#if UNITY_EDITOR
Debug.unityLogger.logEnabled = debugOn;
#else
Debug.unityLogger.logEnabled != debugOn;
#endif
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment