Timeline Editor Window - UnityContrib/framework GitHub Wiki

Timeline Editor Window

Ever wanted to visualize the duration of a log entry? This window lets you do just that and it is very simple to use.

Example of the timeline log window

Just surround the code you want to log with a using block and you're good to go.

This is the only code you need to log to the timeline:

        using (new TimelineLog("Clementine", "Actions.Executing.ExploreAction", "ExploreAction"))
        {
            // explore action here
        }

The first argument of TimelineLog is the source. It could be the name of a game object, a class, a player name and so on.

The second argument is the category. Each source can have multiple categories.

The third argument is the event in the category. Each category can have multiple events but it is better not to have multiple events in the same category at the same time.