Created
July 1, 2014 05:23
-
-
Save masayuki5160/fb44f81dae7e1feec4c5 to your computer and use it in GitHub Desktop.
DEVELOPMENT_BUILDでもいける. [参考]http://qiita.com/rodostw/items/39183e62ed2a1f52f690
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if !UNITY_EDITOR | |
#define DEBUG_LOG_OVERWRAP | |
#endif | |
using UnityEngine; | |
#if DEBUG_LOG_OVERWRAP | |
public static class Debug | |
{ | |
static public void Break(){ | |
if( IsEnable() ) UnityEngine.Debug.Break(); | |
} | |
static public void Log( object message ){ | |
if( IsEnable() ){ | |
UnityEngine.Debug.Log( message ); | |
} | |
} | |
static public void Log( object message, Object context ){ | |
if( IsEnable() ) { | |
UnityEngine.Debug.Log( message, context ); | |
} | |
} | |
static bool IsEnable(){ | |
#if DEVELOPMENT_BUILD | |
return true; | |
#endif | |
return false; | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment