com.amanotes.gdk 0.2.68 → 0.2.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/Editor/AmaGDKEditor.cs +78 -23
  3. package/Editor/AmaGDKExtra.cs +14 -13
  4. package/Editor/Extra/GDKAutoUpdateAdapter.cs +14 -1
  5. package/Editor/Extra/GDKSymbolDefine.cs +372 -0
  6. package/Editor/{AmaGDKManager.cs.meta → Extra/GDKSymbolDefine.cs.meta} +1 -1
  7. package/Editor/Utils/AmaGDKEditor.ExtractVersion.cs +41 -3
  8. package/Extra/AmaGDKInstaller.unitypackage +0 -0
  9. package/Extra/CheckDiskSpace.unitypackage +0 -0
  10. package/Extra/Consent.unitypackage +0 -0
  11. package/Extra/{GoogleCMP.unitypackage.meta → Consent.unitypackage.meta} +1 -1
  12. package/Extra/ForceUpdate.unitypackage +0 -0
  13. package/Extra/LegacyGDKUpdateHelper.unitypackage +0 -0
  14. package/Extra/PostProcessor.unitypackage +0 -0
  15. package/Packages/AmaGDKConfig.unitypackage +0 -0
  16. package/Packages/AmaGDKExample.unitypackage +0 -0
  17. package/Packages/AmaGDKTest.unitypackage +0 -0
  18. package/Packages/AppsFlyerAdapter.PurchaseConnector.unitypackage +0 -0
  19. package/Packages/AppsFlyerAdapter.unitypackage +0 -0
  20. package/Packages/FirebaseAnalyticsAdapter.unitypackage +0 -0
  21. package/Packages/FirebaseRemoteConfigAdapter.unitypackage +0 -0
  22. package/Packages/IronSourceAdapter.unitypackage +0 -0
  23. package/Packages/MaxAdNetworkAdapter.unitypackage +0 -0
  24. package/{Editor/Resources.meta → Packages/MaxAdNetworkAdapter.unitypackage.meta} +1 -2
  25. package/Packages/RevenueCatAdapter.unitypackage +0 -0
  26. package/Packages/SqliteAnalyticsAdapter.unitypackage +0 -0
  27. package/Runtime/Ad/AdExtension.cs +2 -0
  28. package/Runtime/Ad/AdLogic.cs +83 -70
  29. package/Runtime/Ad/AdShowContext.cs +1 -0
  30. package/Runtime/Ad/AmaGDK.Ads.cs +17 -3
  31. package/Runtime/AmaGDK.Adapters.cs +12 -5
  32. package/Runtime/AmaGDK.Analytics.cs +45 -38
  33. package/Runtime/AmaGDK.Consent.cs +259 -0
  34. package/Runtime/AmaGDK.Consent.cs.meta +11 -0
  35. package/Runtime/AmaGDK.Device.cs +4 -4
  36. package/Runtime/AmaGDK.RemoteConfig.cs +3 -1
  37. package/Runtime/AmaGDK.cs +28 -19
  38. package/Runtime/AnalyticQualityAsset.cs +16 -9
  39. package/Runtime/AudioToolkit/AmaGDK.Audio.Latency.cs +1 -3
  40. package/Runtime/AudioToolkit/AmaGDK.Audio.cs +41 -25
  41. package/Runtime/AudioToolkit/Plugins/AudioDeviceDetector.cs +13 -12
  42. package/Runtime/Core/GDKPool.cs +83 -17
  43. package/Runtime/Fps/AmaFPS.cs +0 -1
  44. package/Runtime/Fps/AmaFPSVisualizer.cs +7 -7
  45. package/Runtime/Internal/AmaGDK.Internal.AmaGUI.cs +1 -1
  46. package/Runtime/Internal/AmaGDK.Internal.cs +2 -5
  47. package/Runtime/Internal/AmaGDK.Utils.cs +32 -81
  48. package/Runtime/Internal/GDKGeoLocationcs.cs +3 -1
  49. package/Runtime/Internal/GDKServerTime.cs +13 -10
  50. package/package.json +1 -1
  51. package/Editor/AmaGDKManager.cs +0 -235
  52. package/Editor/Resources/amasdk-modules.json +0 -31
  53. package/Editor/Resources/amasdk-modules.json.meta +0 -7
  54. package/Extra/GoogleCMP.unitypackage +0 -0
@@ -1,235 +0,0 @@
1
- using System;
2
- using System.Collections;
3
- using System.Collections.Generic;
4
- using System.Linq;
5
- using Amanotes.Core;
6
- using UnityEditor;
7
- using UnityEditor.PackageManager.UI;
8
- using UnityEngine;
9
- using UnityEngine.Networking;
10
- namespace Amanotes.Editor
11
- {
12
- [Serializable]
13
- internal class GDKModule
14
- {
15
- public string id;
16
- public string name;
17
- public string adapter;
18
- public string currentVersion;
19
- public int selectIndex;
20
- public string[] versions;
21
- public string infoURL;
22
- }
23
-
24
- [Serializable]
25
- internal class BucketInfo
26
- {
27
- public PackageInfo[] packages;
28
- }
29
-
30
- [Serializable]
31
- internal class PackageInfo
32
- {
33
- public string version;
34
- }
35
-
36
- internal class VersionHelper
37
- {
38
- public const string PACKAGE_NAME = "com.amanotes.gdk";
39
-
40
- public static T[] FromJsonToArray<T>(string json)
41
- {
42
- if (!json.StartsWith("{\"items\":"))
43
- {
44
- json = $"{{\"items\":{json}}}";
45
- }
46
- Wrapper<T> wrapper = JsonUtility.FromJson<Wrapper<T>>(json);
47
- return wrapper.items;
48
- }
49
-
50
- public static List<GDKModule> LoadLocalModuleInfo()
51
- {
52
- List<GDKModule> dicModule = new List<GDKModule>();
53
- string jsonServices = Resources.Load<TextAsset>("amasdk-modules").text;
54
- if (!string.IsNullOrEmpty(jsonServices))
55
- {
56
- GDKModule[] configs = FromJsonToArray<GDKModule>(jsonServices);
57
-
58
- foreach (var config in configs)
59
- {
60
- var module = new GDKModule();
61
- module.infoURL = config.infoURL;
62
- module.name = config.name;
63
- module.adapter = config.adapter;
64
- module.id = config.id;
65
- module.currentVersion = ExtractVersion.GDKAdapter(module.adapter);
66
- dicModule.Add(module);
67
- }
68
- }
69
- return dicModule;
70
- }
71
-
72
- public static void UpdateListVersions(GDKModule module)
73
- {
74
- LoadModuleInfo($"{module.infoURL}/package.json",
75
- bucketInfo =>
76
- {
77
- if (bucketInfo != null)
78
- {
79
- module.versions = bucketInfo.packages.Select(p => p.version).ToArray();
80
- }
81
- }).StartEditorCoroutine();
82
- }
83
-
84
- private static IEnumerator LoadModuleInfo(string url, Action<BucketInfo> callback)
85
- {
86
- BucketInfo bucketInfo = null;
87
-
88
- using (var www = UnityWebRequest.Get(url))
89
- {
90
- yield return www.SendWebRequest();
91
-
92
- while (www.isDone == false)
93
- yield return null;
94
-
95
- bucketInfo = JsonUtility.FromJson<BucketInfo>(www.downloadHandler.text);
96
- }
97
- callback(bucketInfo);
98
- }
99
-
100
- [Serializable]
101
- private class Wrapper<T>
102
- {
103
- public T[] items;
104
- }
105
- }
106
-
107
- public class AmaGDKManager : EditorWindow
108
- {
109
- private static AmaGDKManager window;
110
- private Dictionary<string, string> dicThirdparty;
111
- private List<GDKModule> listModule;
112
- private GUIStyle headerStyle;
113
-
114
- #if AMAGDK_DEV
115
- [MenuItem("AmaGDK/AmaGDK Manager", priority = 1)]
116
- private static void ShowAmaSDKNotificationEditor()
117
- {
118
- if(window)
119
- {
120
- window.Show();
121
- return;
122
- }
123
- window = GetWindow<AmaGDKManager>();
124
- window.titleContent = new GUIContent("AmaGDK Manager");
125
- window.minSize = new Vector2(600, 600);
126
- window.Show();
127
- }
128
- #endif
129
-
130
- private void OnEnable()
131
- {
132
- headerStyle = new GUIStyle();
133
- headerStyle.normal.textColor = Color.green;
134
- dicThirdparty = new Dictionary<string, string>();
135
- listModule = VersionHelper.LoadLocalModuleInfo();
136
- foreach (var module in listModule)
137
- {
138
- VersionHelper.UpdateListVersions(module);
139
- dicThirdparty.Add(module.id, ExtractVersion.ThirdParty(module.id));
140
- }
141
- }
142
-
143
- private void DrawUILine(int thickness = 2, int padding = 10)
144
- {
145
- var r = EditorGUILayout.GetControlRect(GUILayout.Height(padding + thickness));
146
- r.height = thickness;
147
- r.y += padding / 2f;
148
- r.x -= 2;
149
- r.width += 6;
150
- EditorGUI.DrawRect(r, EditorGUIUtility.isProSkin ? Color.black : Color.gray);
151
- }
152
-
153
- private void ModuleInformation()
154
- {
155
- foreach (var module in listModule)
156
- {
157
- string currentVersion = module.currentVersion;
158
- string[] versions = module.versions;
159
- DrawUILine();
160
- GUILayout.Label(module.name, headerStyle);
161
- GUILayout.BeginVertical();
162
- {
163
- GUILayout.Space(10);
164
- GUILayout.BeginHorizontal(GUILayout.Width(450));
165
- {
166
- GUILayout.BeginVertical();
167
- {
168
- GUILayout.Label($"- Adapter version: {(string.IsNullOrEmpty(currentVersion) ? "None" : currentVersion)}");
169
- if (dicThirdparty != null && dicThirdparty.ContainsKey(module.id))
170
- {
171
- GUILayout.Label($"- Thirdparty version: {dicThirdparty[module.id]}");
172
- }
173
- else
174
- {
175
- GUILayout.Label("- Thirdparty version: None");
176
- }
177
- }
178
- GUILayout.EndVertical();
179
-
180
- GUILayout.BeginVertical();
181
- {
182
- if (versions != null && versions.Length > 0)
183
- {
184
- module.selectIndex = EditorGUILayout.Popup("Adapter all version:", module.selectIndex, versions);
185
- if (GUILayout.Button(!string.IsNullOrEmpty(currentVersion) ? "Update" : "Install"))
186
- {
187
- // Install or update module
188
- }
189
- }
190
- }
191
- GUILayout.EndVertical();
192
- }
193
- GUILayout.EndHorizontal();
194
- }
195
- GUILayout.EndVertical();
196
- }
197
- }
198
-
199
- private void AmaGDKCoreInformation()
200
- {
201
- GUILayout.Space(10);
202
- GUILayout.Label("AmaGDK Core", headerStyle);
203
- GUILayout.Label(string.Format("version: {0}", AmaGDK.VERSION));
204
- if (GUILayout.Button("Check Update", GUILayout.MaxWidth(100)))
205
- {
206
- Window.Open(VersionHelper.PACKAGE_NAME);
207
- }
208
- }
209
-
210
- private void OnGUI()
211
- {
212
- GUILayout.BeginVertical();
213
- {
214
- GUILayout.BeginHorizontal();
215
- {
216
- GUILayout.Space(10);
217
-
218
- GUILayout.BeginVertical(GUILayout.MaxWidth(150));
219
- {
220
- AmaGDKCoreInformation();
221
- }
222
- GUILayout.EndVertical();
223
-
224
- GUILayout.BeginVertical();
225
- {
226
- ModuleInformation();
227
- }
228
- GUILayout.EndVertical();
229
- }
230
- GUILayout.EndHorizontal();
231
- }
232
- GUILayout.EndVertical();
233
- }
234
- }
235
- }
@@ -1,31 +0,0 @@
1
- [
2
- {
3
- "id": "FirebaseAnalytics",
4
- "name": "Firebase Analytics",
5
- "adapter": "FirebaseAnalyticsAdapter",
6
- "infoURL": "https://d29y8yeuyaq8nk.cloudfront.net/firebase-analytics"
7
- },
8
- {
9
- "id": "FirebaseRemoteConfig",
10
- "name": "Firebase Remote Config",
11
- "adapter": "",
12
- "infoURL": "https://d29y8yeuyaq8nk.cloudfront.net/firebase-remote-config"
13
- },
14
- {
15
- "id": "AppsFlyer",
16
- "name": "AppsFlyer",
17
- "adapter": "AppsFlyerAdapter",
18
- "infoURL": "https://d29y8yeuyaq8nk.cloudfront.net/appsflyer"
19
- },
20
- {
21
- "id": "IronSource",
22
- "name": "Ironsource",
23
- "infoURL": "https://d29y8yeuyaq8nk.cloudfront.net/ama-ironsource"
24
- },
25
- {
26
- "id": "RevenueCat",
27
- "name": "Revenuecat",
28
- "adapter": "",
29
- "infoURL": "https://d29y8yeuyaq8nk.cloudfront.net/ama-revenuecat"
30
- }
31
- ]
@@ -1,7 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 4ea137f13e3884de083707626db8fb45
3
- TextScriptImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
Binary file