using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MyTime : MonoBehaviour {
// Update is called once per frame
void Update () {
Debug.LogFormat("游戏运行时长:{0}", Time.time);
// 获取两次Update之间的运行时间间隔
Debug.Log(Time.deltaTime);
// 获取两次FixedUpdate之间的运行时间间隔
Debug.Log(Time.fixedDeltaTime);
// 时间缩放 正常为1
Debug.Log(Time.timeScale);
}
}
03-Time类
最新推荐文章于 2021-04-20 10:47:55 发布