minigame-tuanjie-transform-sdk/Runtime/WXSDKPerf/WXPerfEngine.cs

53 lines
1.1 KiB
C#
Raw Normal View History

2024-10-08 15:06:37 +08:00
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Xml;
using UnityEngine;
using UnityEngine.Scripting;
2024-10-18 16:25:29 +08:00
#if PLATFORM_WEIXINMINIGAME || PLATFORM_WEBGL || UNITY_EDITOR
2024-10-21 10:40:01 +08:00
2024-10-08 15:06:37 +08:00
2024-10-18 16:25:29 +08:00
#if ENABLE_WX_PERF_FEATURE
2024-10-08 15:06:37 +08:00
namespace WXSDKPerf
{
[Preserve]
[ComVisible(false)]
public class WXPerfEngine
{
static WXPerfEngine_Implementation m_PerfEngineImplementation = null;
[RuntimeInitializeOnLoadMethod]
public static void StartWXPerfEngine()
{
#if UNITY_EDITOR
return;
#endif
m_PerfEngineImplementation = new WXPerfEngine_Implementation();
m_PerfEngineImplementation.StartPerfEngine();
}
public static void Annotation(string InAnnotationString)
{
#if UNITY_EDITOR
return;
#endif
if (m_PerfEngineImplementation == null)
{
UnityEngine.Debug.LogError("Annotation: Invalid m_PerfEngineImplementation! ");
return;
}
m_PerfEngineImplementation.Annotation(InAnnotationString);
}
}
}
2024-10-18 16:25:29 +08:00
#endif
2024-10-08 15:06:37 +08:00
#endif // ENABLE_WX_PERF_FEATURE