Debug.Log Extensions
Documentation (1.1.9)

◆ StartStopwatch() [2/2]

static void Debug.StartStopwatch ( [NotNull] string  name)

Starts a new stopwatch counting upwards from zero with the given name.

The stopwatch will continue running until FinishStopwatch(string) is called with the same name.

If a stopwatch by the same name already exists a warning will be logged and no new stopwatch will be started.

void Start()
// Prints:
// LoadLevel : Test . . . 14.672 s
void LoadLevel(string sceneName)
Debug.StartStopwatch($"{nameof(LoadLevel)} : {sceneName}");
static void FinishStopwatch()
Logs results of the last created stopwatch and clears it.
Definition: Debug.cs:5492
static void StartStopwatch()
Starts a new stopwatch counting upwards from zero.
Definition: Debug.cs:5117
Extended version of the built-in Debug class with additional methods to ease debugging while developi...
Definition: Debug.cs:34
nameThe name for the stopwatch.