Skip to content

Instantly share code, notes, and snippets.

@seiji
Last active September 29, 2015 21:57
Show Gist options
  • Save seiji/1674536 to your computer and use it in GitHub Desktop.
Save seiji/1674536 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
using System;
using System.IO;
using System.Text.RegularExpressions;
using UnityEngineInternal;
public static class Debug
{
public static bool isDebugBuild = true;
private static string hr = "\n\n-------------------------------------------------------------------------------";
public static void Log (object message)
{
if (isDebugBuild)
UnityEngine.Debug.Log (message + hr);
}
public static void Log (object message, UnityEngine.Object context)
{
if (isDebugBuild)
UnityEngine.Debug.Log (message, context);
}
public static void LogError (object message)
{
if (isDebugBuild)
UnityEngine.Debug.LogError (message);
}
public static void LogError (object message, UnityEngine.Object context)
{
if (isDebugBuild)
UnityEngine.Debug.LogError (message, context);
}
public static void LogWarning (object message)
{
if (isDebugBuild)
UnityEngine.Debug.LogWarning (message.ToString ());
}
public static void LogWarning (object message, UnityEngine.Object context)
{
if (isDebugBuild)
UnityEngine.Debug.LogWarning (message.ToString (), context);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment