Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 732 Bytes

README.md

File metadata and controls

38 lines (30 loc) · 732 Bytes

Unity Logger

Log and assert everywhere in your code.

Instalation

Download and put Logger.cs file in root (Assets).

Usage

use log everywhere even in expressions

int x = 5;
x.Log("my x");
if (5+6+y.Log("y")<35)
{
  //do something
}

use log to print single object or multiple objects

"hello".Log();
myObj.Log("My object and some", x, y, d, f);

specify your log type by using LogType

param.Log("Parameter is so big", obj1,obj2, ..., Logger.LogType.Warning);

use assert to for easy debuging it will log and break or throw AssertionException on debug

(x<5).Assert("Assert if x is not less then 5")

//assert if obj is null
SomeMethod(obj.Assert("obj mast be not null"));