浏览代码

Merge branch 'master' of https://github.com/UnityTech/UIWidgets into layout

/main
Yuncong Zhang 5 年前
当前提交
dae3fcb7
共有 1 个文件被更改,包括 11 次插入9 次删除
  1. 20
      Runtime/editor/editor_window.cs

20
Runtime/editor/editor_window.cs


this._devicePixelRatio = this.queryDevicePixelRatio();
this._antiAliasing = this.queryAntiAliasing();
var size = this.queryWindowSize();
this._lastWindowWidth = size.x;
this._lastWindowHeight = size.y;
this._physicalSize = new Size(
this._lastWindowWidth * this._devicePixelRatio,
this._lastWindowHeight * this._devicePixelRatio);
this.updateSafeArea();
D.assert(this._surface == null);
this._surface = this.createSurface();

}
public void Update() {
if (this._physicalSize == null) {
var size = this.queryWindowSize();
this._lastWindowWidth = size.x;
this._lastWindowHeight = size.y;
this._physicalSize = new Size(
this._lastWindowWidth * this._devicePixelRatio,
this._lastWindowHeight * this._devicePixelRatio);
}
this.updateDeltaTime();
this.updateFPS(this.unscaledDeltaTime);

this.flushMicrotasks();
}
}
public override void scheduleFrame(bool regenerateLayerTree = true) {
if (regenerateLayerTree) {
this._regenerateLayerTree = true;

正在加载...
取消
保存