Skip to content

Instantly share code, notes, and snippets.

@baba-s
Last active December 30, 2015 18:09
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 baba-s/7865881 to your computer and use it in GitHub Desktop.
Save baba-s/7865881 to your computer and use it in GitHub Desktop.
using System.Diagnostics;
using UnityEngine;
/// <summary>
/// 独自のDebugクラス
/// </summary>
public static class MyDebug
{
/// <summary>
/// ログを出力する
/// </summary>
/// <param name="message">メッセージ</param>
[Conditional("DEBUG")]
public static void Log(Object message)
{
UnityEngine.Debug.Log(message);
}
/// <summary>
/// ログを出力する
/// </summary>
/// <param name="message">メッセージ</param>
/// <param name="context">ログを出力したオブジェクト</param>
[Conditional("DEBUG")]
public static void Log(Object message, Object context)
{
UnityEngine.Debug.Log(message, context);
}
/// <summary>
/// 警告ログを出力する
/// </summary>
/// <param name="message">メッセージ</param>
[Conditional("DEBUG")]
public static void LogWarning(Object message)
{
UnityEngine.Debug.LogWarning(message);
}
/// <summary>
/// 警告ログを出力する
/// </summary>
/// <param name="message">メッセージ</param>
/// <param name="context">ログを出力したオブジェクト</param>
[Conditional("DEBUG")]
public static void LogWarning(Object message, Object context)
{
UnityEngine.Debug.LogWarning(message, context);
}
/// <summary>
/// エラーログを出力する
/// </summary>
/// <param name="message">メッセージ</param>
[Conditional("DEBUG")]
public static void LogError(Object message)
{
UnityEngine.Debug.LogError(message);
}
/// <summary>
/// エラーログを出力する
/// </summary>
/// <param name="message">メッセージ</param>
/// <param name="context">ログを出力したオブジェクト</param>
[Conditional("DEBUG")]
public static void LogError(Object message, Object context)
{
UnityEngine.Debug.LogError(message, context);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment