fix: 修复IO接口问题, guru-services 改为内置 resources 存储

feature/item_system
胡宇飞 2024-01-08 10:22:56 +08:00
parent 74acbe841b
commit 8881b2f442
3 changed files with 12 additions and 6 deletions

View File

@ -26,11 +26,10 @@ namespace Guru.Editor
/// <returns></returns> /// <returns></returns>
public static GuruServicesConfig LoadConfig() public static GuruServicesConfig LoadConfig()
{ {
var a = AssetDatabase.FindAssets($"*{SourceConfigFileName}* t:TextAsset", var a = AssetDatabase.FindAssets($"*{SourceConfigFileName}* t:TextAsset", new []{"Assets"});
new string[] { Application.dataPath });
if (a == null || a.Length == 0) if (a == null || a.Length == 0)
{ {
Debug.Log($"<color=orange>--- Can't ind guru-services file</color>"); Debug.Log($"<color=orange>--- Can't find guru-services file</color>");
} }
else else
{ {
@ -108,7 +107,7 @@ namespace Guru.Editor
if (null != config) if (null != config)
{ {
if (File.Exists(path)) File.Delete(path); if (File.Exists(path)) File.Delete(path);
Debug.Log($"<color=#88ff00> --- setup {GuruSDK.ServicesConfigKey} file on streamingPath</color>"); Debug.Log($"<color=#88ff00> --- setup {GuruSDK.ServicesConfigKey} to local resources.</color>");
File.Copy(from, path); File.Copy(from, path);
} }
} }

View File

@ -2,7 +2,7 @@
namespace Guru namespace Guru
{ {
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine;
/// <summary> /// <summary>
/// 打点管理 /// 打点管理
@ -51,6 +51,12 @@ namespace Guru
string levelCategory = "main", string levelName = "", string levelID = "", string levelCategory = "main", string levelName = "", string levelID = "",
bool isReplay = false) bool isReplay = false)
{ {
if (!IsInitialSuccess)
{
Debug.LogError($"{Tag} Please call <GuruSDK.Init()> first, before you call the log event api.");
return;
}
Analytics.LogLevelStart(level, levelName, levelCategory, levelID, startType, isReplay); Analytics.LogLevelStart(level, levelName, levelCategory, levelID, startType, isReplay);
} }

View File

@ -197,7 +197,8 @@ namespace Guru
} }
useIAP = _appServicesConfig.IsIAPEnabled(); useIAP = _appServicesConfig.IsIAPEnabled();
} }
AdjustService.StartService();
// AdjustService.StartService();
if(useIAP) { if(useIAP) {
InitIAP(_initConfig.GoogleKeys, _initConfig.AppleRootCerts); // 初始化IAP InitIAP(_initConfig.GoogleKeys, _initConfig.AppleRootCerts); // 初始化IAP