Log

How to do logs in Console

You still can call Debug.Log() or print()

Also you can use TIM.Console.Log()

Here is an example:

TIM.Console.Log("Game started");
How it looks like in Console

Also you can change the MessageType of your message:

Message types:

💬 Default

🟨 Warning

🟥 Error

🟦 Network

How it looks like in Console

Logchain

Sometimes an in-game event does not happen immediately, it can be divided into several stages. 'Logchain' was created for this purpose

Example

You are downloading an image from Internet in 3 stages:

  1. Web request

  2. Downloading

  3. Converting downloaded data to Texture2D

You can group all these messages into one Logchain. Just give it name.

For example: "Image downloading". Here is how you can print a message:

So how our method can look like:

Lets try it!

Execute our coroutine by StartCoroutine() method. And paste image URL as argument.

Open console by ` and you can see that messages are displayed in Console window and in Logchain window as well

How it looks like in console

Hidden messages

Hidden messages are hidden in Console (but not hidden in Logchain window)

Lets take our last example with downloading image. If we will download images many times we will have many messages in Console. But we can organize it better! We can hide logs in Console but keep them visible in Logchain window. You just need to set last argument hidden of TIM.Console.Log() function to true:

And how our function looks like now:

What we will see in Console:

Console is clear. But Logchain exists.

You can enable visibility of hidden messages by clicking this button:

Toggle it and what you can see now:

Last updated