Skip to content

truejim/UnityObjectLoggerExt

 
 

Repository files navigation

UnityObjectLoggerExt

This utility classes enable you to write shorter log messages with more common info in Unity.

Copy UnityObjectLoggerExt.cs (included in the root of the project) to your Assets folder.

Now you can use LogLog, LogWarn and LogError extension methods.

using NoSuchStudio.Common;

public class MyClassB : MonoBehaviour {
    void Start() {
        this.LogLog("Hello World!");
    }
}

output

Optionally you can copy over MonoBehaviourWithLogger.cs to your Assets folder and omit this.. It produces the same output as above.

using NoSuchStudio.Common;

public class MyClassB: MonoBehaviourWithLogger
{
    void Start() {
        LogLog("Hello World!");
    }
}

To learn more about this project, read this blog post: https://medium.com/@nosuchstudio/improve-unitys-logging-with-this-class-fc99c91f5564

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 100.0%