浏览代码

Merge pull request #94 from UnityTech/xwzhu

performance overlay bug fix
/main
GitHub 6 年前
当前提交
df9de912
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 12
      Runtime/flow/instrumentation.cs

12
Runtime/flow/instrumentation.cs


}
canvas.drawPath(barPath, paint);
if (curFrame >= 0 && curFrame < costFrames.Length && costFrames[curFrame] != 0) {
float curHeight = Mathf.Min(perHeight * costFrames[curFrame] * 1000, rect.height);
Rect barRect = Rect.fromLTWH(rect.left + barWidth * curFrame, rect.top + rect.height - curHeight,
barWidth, curHeight);
canvas.drawRect(barRect, paint2);
if (curFrame >= 0 && curFrame < costFrames.Length) {
if (costFrames[curFrame] != 0) {
float curHeight = Mathf.Min(perHeight * costFrames[curFrame] * 1000, rect.height);
Rect barRect = Rect.fromLTWH(rect.left + barWidth * curFrame, rect.top + rect.height - curHeight,
barWidth, curHeight);
canvas.drawRect(barRect, paint2);
}
var pb = new ParagraphBuilder(new ParagraphStyle { });
pb.addText("Current Frame Cost: " + costFrames[curFrame] * 1000 + "ms" + " ; Max(in last 120 frames): " + this.maxDelta() * 1000 + "ms");

正在加载...
取消
保存