Unity Time

 Time

靜態屬性

time 遊戲進行了多少時間 進行第一個frame就進行計算

realtimeSinceStartup 遊戲進行了多少時間(不受timeScals)影響 遊戲一開始就進行計算

deltaTime 每個frame進行了多久時間 單位為秒

TimeScals 加速及減速使用


deltaTime 是看FPS進行速度給予 在Edit-ProjectSetting-Other中可以設定VSync Count 為 no count

然後再自己設定更新頻率 Application.targetFrameRate = 30;


FixedUpdate 是每秒固定的數值 不像Update還是會飄











留言

這個網誌中的熱門文章

無法載入檔案或組件 'System.IO.Compression' 或其相依性的其中之一。

MongoDB 入門

javascript 更改屬性及創建標籤