Playground by Górka Mateusz
Goo.Tools.UnityHelpers.LogHelper Class Reference

Static Public Member Functions

static void Log (this Object obj, string msg)
 
static void LogWarning (this Object obj, string msg)
 
static void LogError (this Object obj, string msg)
 
static void Log (this GameObject obj, string msg)
 
static void LogWarning (this GameObject obj, string msg)
 
static void LogError (this GameObject obj, string msg)
 
static string LogMessage (Object obj, string msg)
 
static string LogMessage (GameObject obj, string msg)
 
static string PathToGameObject (this GameObject obj)
 
static string PathToGameObject (this Transform obj)
 

Member Function Documentation

◆ Log() [1/2]

static void Goo.Tools.UnityHelpers.LogHelper.Log ( this Object  obj,
string  msg 
)
static

◆ LogWarning() [1/2]

static void Goo.Tools.UnityHelpers.LogHelper.LogWarning ( this Object  obj,
string  msg 
)
static

◆ LogError() [1/2]

static void Goo.Tools.UnityHelpers.LogHelper.LogError ( this Object  obj,
string  msg 
)
static

◆ Log() [2/2]

static void Goo.Tools.UnityHelpers.LogHelper.Log ( this GameObject  obj,
string  msg 
)
static

◆ LogWarning() [2/2]

static void Goo.Tools.UnityHelpers.LogHelper.LogWarning ( this GameObject  obj,
string  msg 
)
static

◆ LogError() [2/2]

static void Goo.Tools.UnityHelpers.LogHelper.LogError ( this GameObject  obj,
string  msg 
)
static

◆ LogMessage() [1/2]

static string Goo.Tools.UnityHelpers.LogHelper.LogMessage ( Object  obj,
string  msg 
)
inlinestatic
16 {
17 return $"[{obj.name}] {msg}";
18 }

◆ LogMessage() [2/2]

static string Goo.Tools.UnityHelpers.LogHelper.LogMessage ( GameObject  obj,
string  msg 
)
inlinestatic
21 {
22 return $"{msg}\n| {obj.PathToGameObject()}\n";
23 }

◆ PathToGameObject() [1/2]

static string Goo.Tools.UnityHelpers.LogHelper.PathToGameObject ( this GameObject  obj)
inlinestatic
26 {
27 return obj.transform.PathToGameObject();
28 }

◆ PathToGameObject() [2/2]

static string Goo.Tools.UnityHelpers.LogHelper.PathToGameObject ( this Transform  obj)
inlinestatic
31 {
32 string path = obj.name;
33 while (obj != null)
34 {
35 // idea optimise with string builder
36 path = $"{obj.name}/{path}";
37 obj = obj.parent;
38 }
39 return path;
40 }

The documentation for this class was generated from the following file: