how to disable console messages in unity build code example
Example: Disable Debug.log Unity
#if UNITY_EDITOR
Debug.logger.logEnabled = true;
#else
Debug.logger.logEnabled = false;
#endif
#if UNITY_EDITOR
Debug.logger.logEnabled = true;
#else
Debug.logger.logEnabled = false;
#endif