Skip to content

Instantly share code, notes, and snippets.

@p-chin
Created October 11, 2013 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p-chin/6933421 to your computer and use it in GitHub Desktop.
Save p-chin/6933421 to your computer and use it in GitHub Desktop.
開発環境じゃなかったらLogを出さなくする仕組み
#if !DEV
using UnityEngine;
using System.Collections;
/// <summary>
/// 自家製のDebugクラス.
/// Debug.Logの出力をDEV環境以外では空にする為に作った
/// </summary>
public class Debug : MonoBehaviour
{
public static void Log (object message) {
}
public static void Log (object message, Object context) {
}
public static void LogWarning (object message) {
}
public static void LogWarning (object message, Object context) {
}
public static void LogError (object message) {
}
public static void LogError (object message, Object context) {
}
public static void Break () {
}
public static void DrawLine (Vector3 start, Vector3 end) {
}
public static void DrawLine (Vector3 start, Vector3 end, Color color) {
}
public static void DrawLine (Vector3 start, Vector3 end, Color color, float duration) {
}
public static void DrawLine (Vector3 start, Vector3 end, Color color, float duration, bool depthTest) {
}
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment