Legacy Documentation: Version 4.6.2
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Time.timeSinceLevelLoad

public static float timeSinceLevelLoad;

Description

The time this frame has started (Read Only). This is the time in seconds since the last level has been loaded.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void PlayerCompletedGame() {
        guiText.text = Time.timeSinceLevelLoad.ToString();
    }
}