From 3871841988771b9b21e2cb60a8055a21320b7920 Mon Sep 17 00:00:00 2001 From: huyufei Date: Tue, 12 Mar 2024 10:35:00 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=B7=BB=E5=8A=A0=20AppVersion=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E8=8E=B7=E5=8F=96=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Code/SDK/GuruSDK.Properties.cs | 52 +++++++++++++++++++++ Runtime/Code/SDK/GuruSDK.Properties.cs.meta | 3 ++ Runtime/Code/SDK/GuruSDK.cs | 26 +---------- 3 files changed, 56 insertions(+), 25 deletions(-) create mode 100644 Runtime/Code/SDK/GuruSDK.Properties.cs create mode 100644 Runtime/Code/SDK/GuruSDK.Properties.cs.meta diff --git a/Runtime/Code/SDK/GuruSDK.Properties.cs b/Runtime/Code/SDK/GuruSDK.Properties.cs new file mode 100644 index 0000000..0828822 --- /dev/null +++ b/Runtime/Code/SDK/GuruSDK.Properties.cs @@ -0,0 +1,52 @@ +namespace Guru +{ + public partial class GuruSDK + { + + public static string UID => _model?.UserId ?? IPMConfig.IPM_UID; + public static string DeviceId => IPMConfig.IPM_DEVICE_ID ?? ""; // TODO: change it to _model member later. + + public static string PushToken => IPMConfig.IPM_PUSH_TOKEN ?? ""; // TODO: change it to _model member later. + + public static string SupportEmail => GuruSettings.SupportEmail ?? ""; + + public static string StoreUrl + { + get + { + string url = ""; +#if UNITY_EDITOR + url = "https://test@com.guru.ai"; +#elif UNITY_ANDROID + url = GuruSettings?.AndroidStoreUrl ?? ""; +#elif UNITY_IOS + url = GuruSettings?.IOSStoreUrl ?? ""; +#endif + return url; + } + } + + public static string AppVersion =>GuruAppVersion.version; + + public static string AppVersionCode => GuruAppVersion.code; + + public static string AppVersionString => GuruAppVersion.ToString(); + + + + private static GuruAppVersion _appVersion; + private static GuruAppVersion GuruAppVersion + { + get + { + if(_appVersion == null) _appVersion = GuruAppVersion.Load(); + return _appVersion; + } + } + + } + + + + +} \ No newline at end of file diff --git a/Runtime/Code/SDK/GuruSDK.Properties.cs.meta b/Runtime/Code/SDK/GuruSDK.Properties.cs.meta new file mode 100644 index 0000000..7096fe4 --- /dev/null +++ b/Runtime/Code/SDK/GuruSDK.Properties.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ab7d65b5c8774a12924f3fe72a6e4a38 +timeCreated: 1710154459 \ No newline at end of file diff --git a/Runtime/Code/SDK/GuruSDK.cs b/Runtime/Code/SDK/GuruSDK.cs index e6d60aa..9aee671 100644 --- a/Runtime/Code/SDK/GuruSDK.cs +++ b/Runtime/Code/SDK/GuruSDK.cs @@ -8,7 +8,7 @@ namespace Guru public partial class GuruSDK: MonoBehaviour { - public const string Version = "1.0.7"; + public const string Version = "1.0.9"; public const string Tag = "[Guru]"; public const string ServicesConfigKey = "guru_services"; @@ -402,30 +402,6 @@ namespace Guru { SetUserBPlay(bplay); } - - public static string UID => _model?.UserId ?? IPMConfig.IPM_UID; - - public static string DeviceId => IPMConfig.IPM_DEVICE_ID ?? ""; // TODO: change it to _model member later. - - public static string PushToken => IPMConfig.IPM_PUSH_TOKEN ?? ""; // TODO: change it to _model member later. - - public static string SupportEmail => GuruSettings.SupportEmail ?? ""; - - public static string StoreUrl - { - get - { - string url = ""; -#if UNITY_EDITOR - url = "https://test@com.guru.ai"; -#elif UNITY_ANDROID - url = GuruSettings?.AndroidStoreUrl ?? ""; -#elif UNITY_IOS - url = GuruSettings?.IOSStoreUrl ?? ""; -#endif - return url; - } - } #endregion