浏览代码

Fix.

/main
Yuncong Zhang 6 年前
当前提交
ce836c52
共有 3 个文件被更改,包括 6 次插入6 次删除
  1. 2
      README-ZH.md
  2. 2
      README.md
  3. 8
      Runtime/ui/window.cs

2
README-ZH.md


#### 七、自动调节帧率
如果要使得构建出的应用能够自动调节帧率,请打开Project Settings,将构建目标平台对应的Quality选项卡中的V Sync Count设置为Don't Sync。
默认的逻辑是在界面静止时将帧率降低为15,在界面变动时将帧率提高至60。
如果您需要修改帧率升高或降低时的行为,请将`Window.speedUpFrameRate`和/或`Window.coolDownFrameRate`设置为您自己的函数。
如果您需要修改帧率升高或降低时的行为,请将`Window.onFrameRateSpeedUp`和/或`Window.onFrameRateCoolDown`设置为您自己的函数。
## 调试UIWidgets应用程序

2
README.md


To build an App that is able to adjust the frame rate automatically, please open Project Settings, and in the Quality tab, set the "V Sync Count" option of the target platform to "Don't Sync".
The default logic is to set the frame rate to 15 when the screen is static, and change the frame rate to 60 whenever the screen changes.
If you would like to modify the behavior of speeding up or cooling down the frame rate, please set `Window.speedUpFrameRate` and/or `Window.coolDownFrameRate` to your own functions.
If you would like to modify the behavior of speeding up or cooling down the frame rate, please set `Window.onFrameRateSpeedUp` and/or `Window.onFrameRateCoolDown` to your own functions.
## Debug UIWidgets Application

8
Runtime/ui/window.cs


public const int defaultMaxTargetFrameRate = 60;
public const int defaultMinTargetFrameRate = 15;
static Action _onFrameRateSpeedUp = () => { defaultFrateRateSpeedUp(); };
static Action _onFrameRateSpeedUp = defaultFrateRateSpeedUp;
_onFrameRateSpeedUp = () => { defaultFrateRateSpeedUp(); };
_onFrameRateSpeedUp = defaultFrateRateSpeedUp;
}
else {
_onFrameRateSpeedUp = value;

Application.targetFrameRate = defaultMaxTargetFrameRate;
}
static Action _onFrameRateCoolDown = () => { defaultFrateRateCoolDown(); };
static Action _onFrameRateCoolDown = defaultFrateRateCoolDown;
_onFrameRateCoolDown = () => { defaultFrateRateCoolDown(); };
_onFrameRateCoolDown = defaultFrateRateCoolDown;
}
else {
_onFrameRateCoolDown = value;

正在加载...
取消
保存