From fb492af6335fbf095e6191370f692116a30e942f Mon Sep 17 00:00:00 2001 From: huyufei Date: Wed, 20 Mar 2024 15:40:22 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=96=B0=E5=A2=9E=20Crashlytics=20?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Code/SDK/GuruSDK.Analytics.cs | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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