Skip to content

Commit

Permalink
导出分析数据
Browse files Browse the repository at this point in the history
  • Loading branch information
dechunyu committed Apr 13, 2021
1 parent 78fae8e commit 51eee9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/extensions/performanceTool/PerformanceDataTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,12 @@ export class PerformanceDataTool{
/**
* 输出所有调试数据为ArrayBuffer
*/
exportPerformanceFile(){
exportPerformanceFile(fromProfiler: boolean = false){
PerformanceDataTool.InitLayaPerformanceInfo();
this.enable = false;
if (!fromProfiler) {
// 从性能分析器调用时,不可设置enable
this.enable = false;
}
//TODO:输出数据导出
let blockstr:string[] = [];
let blockStart:number[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export class PerformancePluginDemo {
Stat.show();

PerformancePlugin.setPerformanceDataTool(PerformanceDataTool.instance);
PerformancePlugin.enable = true;
PerformancePlugin.enable = true;
PerformancePlugin.enableDataExport = true;
PerformanceDataTool.instance.samplerFramStep = 1;

var scene: Scene3D = (<Scene3D>Laya.stage.addChild(new Scene3D()));
scene.ambientColor = new Vector3(1, 1, 1);
Expand Down

0 comments on commit 51eee9d

Please sign in to comment.