unity disable debug.log in build code example
Example 1: debug.log unity
Debug.Log("Hello, World");
Example 2: Disable Debug.log Unity
#if UNITY_EDITOR
Debug.logger.logEnabled = true;
#else
Debug.logger.logEnabled = false;
#endif
Debug.Log("Hello, World");
#if UNITY_EDITOR
Debug.logger.logEnabled = true;
#else
Debug.logger.logEnabled = false;
#endif