Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.5 KiB

  1. using UnityEngine;
  2. namespace Oculus.Avatar
  3. {
  4. public static class AvatarLogger
  5. {
  6. public const string LogAvatar = "[Avatars] - ";
  7. public const string Tab = " ";
  8. [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"),
  9. System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_BASIC")]
  10. public static void Log(string logMsg)
  11. {
  12. Debug.Log(LogAvatar + logMsg);
  13. }
  14. [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"),
  15. System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_BASIC")]
  16. public static void Log(string logMsg, Object context)
  17. {
  18. Debug.Log(LogAvatar + logMsg , context);
  19. }
  20. [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"),
  21. System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_WARNING")]
  22. public static void LogWarning(string logMsg)
  23. {
  24. Debug.LogWarning(LogAvatar + logMsg);
  25. }
  26. [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"),
  27. System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_ERROR")]
  28. public static void LogError(string logMsg)
  29. {
  30. Debug.LogError(LogAvatar + logMsg);
  31. }
  32. [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"),
  33. System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_ERROR")]
  34. public static void LogError(string logMsg, Object context)
  35. {
  36. Debug.LogError(LogAvatar + logMsg, context);
  37. }
  38. };
  39. }