SmartBowLogger.cs 766 B

1234567891011121314151617181920212223242526
  1. using UnityEngine;
  2. namespace SmartBowSDK
  3. {
  4. public class SmartBowLogger
  5. {
  6. public static bool isDebug = false;
  7. public static void Log(object context, string message)
  8. {
  9. if (!isDebug) return;
  10. Debug.Log(string.Format("[{0}] {1}", context.GetType().Name, message));
  11. }
  12. public static void LogWarning(object context, string message)
  13. {
  14. if (!isDebug) return;
  15. Debug.LogWarning(string.Format("[{0}] {1}", context.GetType().Name, message));
  16. }
  17. public static void LogError(object context, string message)
  18. {
  19. if (!isDebug) return;
  20. Debug.LogError(string.Format("[{0}] {1}", context.GetType().Name, message));
  21. }
  22. }
  23. }