34 lines
705 B
C#
Raw Normal View History

2025-11-05 17:34:40 +08:00
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;
}
}
}
}