From 6f37ef31a9d3bc92f087a2036681ee58580d0061 Mon Sep 17 00:00:00 2001 From: Yun Hsiao Wu Date: Tue, 31 Dec 2019 09:59:00 +0800 Subject: [PATCH] fix profiler init proc (#6009) --- cocos/core/utils/profiler/profiler.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cocos/core/utils/profiler/profiler.ts b/cocos/core/utils/profiler/profiler.ts index 5f92bc090d..a82fc3f703 100644 --- a/cocos/core/utils/profiler/profiler.ts +++ b/cocos/core/utils/profiler/profiler.ts @@ -223,7 +223,6 @@ export class Profiler { } this._stats = null; - this._inited = false; const now = performance.now(); this._ctx.textAlign = 'left'; @@ -257,7 +256,6 @@ export class Profiler { this._stats = _profileInfo as IProfilerState; this._canvasArr[0] = this._canvas; this.updateTexture(); - this._inited = true; } public generateNode () { @@ -341,6 +339,7 @@ export class Profiler { this.digitsData = pass.blocks[binding]; modelCom.material = _material; modelCom.node.layer = Layers.Enum.PROFILER; + this._inited = true; } public beforeUpdate () {