usingSystem.Collections;usingSystem.Collections.Generic;usingUnityEngine;publicclassgame:MonoBehaviour{// Start is called before the first frame updatefloat timer =0;voidStart(){//游戏开始到现在所花的时间Debug.Log(Time.time);//时间缩放值Debug.Log(Time.timeScale);//固定时间间隔Debug.Log(Time.fixedDeltaTime);}voidUpdate(){timer += Time.deltaTime;//上一帧到这一帧所用的游戏时间//Debug.Log(Time.deltaTime);//如果大于3秒if(timer >3){Debug.Log("大于3秒了");}}}