From 8881b2f442c32595e26e4e23430827ba3fe792b2 Mon Sep 17 00:00:00 2001 From: HuYufei Date: Mon, 8 Jan 2024 10:22:56 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20=E4=BF=AE=E5=A4=8DIO=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=97=AE=E9=A2=98=EF=BC=8C=20guru-services=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=86=85=E7=BD=AE=20resources=20=E5=AD=98?= =?UTF-8?q?=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/GuruManager/Config/EditorGuruServiceIO.cs | 7 +++---- Runtime/Code/SDK/GuruSDK.Analytics.cs | 8 +++++++- Runtime/Code/SDK/GuruSDK.cs | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Editor/GuruManager/Config/EditorGuruServiceIO.cs b/Editor/GuruManager/Config/EditorGuruServiceIO.cs index 0135915..cf4276d 100644 --- a/Editor/GuruManager/Config/EditorGuruServiceIO.cs +++ b/Editor/GuruManager/Config/EditorGuruServiceIO.cs @@ -26,11 +26,10 @@ namespace Guru.Editor /// public static GuruServicesConfig LoadConfig() { - var a = AssetDatabase.FindAssets($"*{SourceConfigFileName}* t:TextAsset", - new string[] { Application.dataPath }); + var a = AssetDatabase.FindAssets($"*{SourceConfigFileName}* t:TextAsset", new []{"Assets"}); if (a == null || a.Length == 0) { - Debug.Log($"--- Can't ind guru-services file"); + Debug.Log($"--- Can't find guru-services file"); } else { @@ -108,7 +107,7 @@ namespace Guru.Editor if (null != config) { if (File.Exists(path)) File.Delete(path); - Debug.Log($" --- setup {GuruSDK.ServicesConfigKey} file on streamingPath"); + Debug.Log($" --- setup {GuruSDK.ServicesConfigKey} to local resources."); File.Copy(from, path); } } diff --git a/Runtime/Code/SDK/GuruSDK.Analytics.cs b/Runtime/Code/SDK/GuruSDK.Analytics.cs index 8e9aeac..db38204 100644 --- a/Runtime/Code/SDK/GuruSDK.Analytics.cs +++ b/Runtime/Code/SDK/GuruSDK.Analytics.cs @@ -2,7 +2,7 @@ namespace Guru { using System.Collections.Generic; - + using UnityEngine; /// /// 打点管理 @@ -51,6 +51,12 @@ namespace Guru string levelCategory = "main", string levelName = "", string levelID = "", bool isReplay = false) { + if (!IsInitialSuccess) + { + Debug.LogError($"{Tag} Please call first, before you call the log event api."); + return; + } + Analytics.LogLevelStart(level, levelName, levelCategory, levelID, startType, isReplay); } diff --git a/Runtime/Code/SDK/GuruSDK.cs b/Runtime/Code/SDK/GuruSDK.cs index 20edc7d..59cb04d 100644 --- a/Runtime/Code/SDK/GuruSDK.cs +++ b/Runtime/Code/SDK/GuruSDK.cs @@ -197,7 +197,8 @@ namespace Guru } useIAP = _appServicesConfig.IsIAPEnabled(); } - AdjustService.StartService(); + + // AdjustService.StartService(); if(useIAP) { InitIAP(_initConfig.GoogleKeys, _initConfig.AppleRootCerts); // 初始化IAP