34 lines
705 B
C#
34 lines
705 B
C#
using System;
|
|
using UnityEditor;
|
|
using UnityEditorInternal;
|
|
using UnityEngine;
|
|
|
|
namespace X.Profiler
|
|
{
|
|
internal class ProfilerHelper
|
|
{
|
|
static ProfilerHelper()
|
|
{
|
|
|
|
}
|
|
|
|
[MenuItem("Tools/Performance/Profiler/转 csv")]
|
|
public static void ProfileFile2CSV()
|
|
{
|
|
|
|
var path = EditorUtility.OpenFilePanel("打开 profiler 数据", "", "raw");
|
|
if (string.IsNullOrEmpty(path))
|
|
{
|
|
return;
|
|
}
|
|
|
|
if(!ProfilerDriver.LoadProfile(path, false))
|
|
{
|
|
Debug.LogError($"open profiler {path} failure.");
|
|
return;
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|