update: 新增 Crashlytics 上报接口

deeplink
胡宇飞 2024-03-20 15:40:22 +08:00
parent 407e242b8c
commit fb492af633
1 changed files with 30 additions and 0 deletions

View File

@ -1,6 +1,9 @@
namespace Guru
{
using System;
using System.Collections.Generic;
using UnityEngine;
@ -297,5 +300,32 @@ namespace Guru
}
#endregion
#region Crashlytics 接口
public static void CrashLog(string message)
{
if (!IsFirebaseReady) return;
CrashlyticsAgent.Log(message);
}
public static void CrashException(string message)
{
if (!IsFirebaseReady) return;
CrashlyticsAgent.LogException(message);
}
public static void CrashException(Exception ex)
{
if (!IsFirebaseReady) return;
CrashlyticsAgent.LogException(ex);
}
public static void CrashCustomKeys(string key, string value)
{
if (!IsFirebaseReady) return;
CrashlyticsAgent.SetCustomKey(key, value);
}
#endregion
}
}