Last active
December 30, 2015 18:09
-
-
Save baba-s/7865881 to your computer and use it in GitHub Desktop.
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
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