diff --git a/Runtime/Code/SDK/GuruSDK.Analytics.cs b/Runtime/Code/SDK/GuruSDK.Analytics.cs index f1fdc27..673157e 100644 --- a/Runtime/Code/SDK/GuruSDK.Analytics.cs +++ b/Runtime/Code/SDK/GuruSDK.Analytics.cs @@ -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 } } \ No newline at end of file