UnityLogUtil is a lightweight and flexible logging utility for Unity. It allows you to easily output styled and colored log messages with rich contextual information, helping you debug faster and more effectively.
- Automatically logs the class and method name from where the log was called.
- Highlights logs with a standard color and allows you to use any custom color for better visual clarity.
- Supports logging only in the Unity Editor or everywhere
LogUtil.LogError(this, "Red error log only for Editor", editorOnly: true);
LogUtil.LogWarning(this, "Logs with yellow color");
LogUtil.LogGreen(this, "Noticeable green log");
LogUtil.Log(this, "Regular white log");
LogUtil.Log(this, "Custom color for connoisseurs", textColor: Color.blue);Copy the LogUtil.cs file into any folder in your project (for example: Assets/Scripts/Utils or any other location)
Unity: 2020.3 and newer
This project is available for free for both commercial and non-commercial use.
