AR + GPS Location  3.0.0
All Classes Namespaces Functions Variables Properties Events Pages
Logger.cs
1 using UnityEngine;
2 // ReSharper disable MemberCanBePrivate.Global
3 // ReSharper disable UnusedMember.Global
4 
5 namespace ARLocation.Utils
6 {
7  public static class Logger
8  {
9  public static void Log(string msg)
10  {
11  Debug.Log(msg);
12  }
13 
14  public static void Warn(string msg)
15  {
16  Debug.LogWarning(msg);
17  }
18 
19  public static void LogFromMethod(string className, string methodName, string message)
20  {
21  Log("[AR+GPS][" + className + "#" + methodName + "]: " + message);
22  }
23 
24  public static void LogFromMethod(string className, string methodName, string message, bool output)
25  {
26  if (!output) return;
27 
28  LogFromMethod(className, methodName, message);
29  }
30 
31  public static void LogFromMethod(string className, string methodName, Transform transform, string prefix = "")
32  {
33  var message = transform.name + " - position = " + transform.position + ", localPosition = " + transform.localPosition + ", hasChanged = " + transform.hasChanged;
34  Log("[AR+GPS][" + className + "#" + methodName + "]: " + prefix + " - " + message);
35  }
36 
37  public static void LogFromMethod(string className, string methodName, Transform[] transform, string prefix = "")
38  {
39  var i = 0;
40  foreach (var transform1 in transform)
41  {
42  i++;
43  LogFromMethod(className, methodName, transform1, prefix + " (" + i + ")");
44  }
45  }
46 
47  public static void WarnFromMethod(string className, string methodName, string message)
48  {
49  Warn("[AR+GPS][" + className + "#" + methodName + "]: " + message);
50  }
51  }
52 }
ARLocation.Utils
Definition: CreatePointOfInterestTextMeshes.cs:9