com.amanotes.gdk 0.2.33 → 0.2.34-1
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.
- package/CHANGELOG.md +7 -0
- package/Editor/AmaGDKEditor.cs +5 -0
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/AmaGDKProject.unitypackage +0 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AppsFlyerAdRevenuePlugin.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter_v6.5.4.unitypackage +0 -0
- package/Packages/FirebaseAnalyticsAdapter_v9.1.0.unitypackage +0 -0
- package/Packages/FirebaseRemoteConfigAdapter_v9.1.0.unitypackage +0 -0
- package/Packages/IronSourceAdapter_v7.2.6.unitypackage +0 -0
- package/Packages/RevenueCatAdapter_v6.0.0.unitypackage +0 -0
- package/Runtime/AmaGDK.RemoteConfig.cs +22 -9
- package/Runtime/AmaGDK.Utils.cs +3 -3
- package/Runtime/AmaGDK.cs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.34-1 - 2023-12-15]
|
|
4
|
+
- Add option to auto save Remote Config
|
|
5
|
+
|
|
6
|
+
## [0.2.34 - 2023-11-10]
|
|
7
|
+
- [Fix] ShowSuccessed event not call in editor
|
|
8
|
+
- Add clear all data button on AmaGDK prefab
|
|
9
|
+
|
|
3
10
|
## [0.2.33 - 2023-11-09]
|
|
4
11
|
- Remove Adjust
|
|
5
12
|
- Update RevenueCat attributes
|
package/Editor/AmaGDKEditor.cs
CHANGED
|
@@ -229,6 +229,11 @@ namespace Amanotes.Editor
|
|
|
229
229
|
ToggleGroup("Adapters", ref showAdapterInstaller, DrawGUI_AdapterList);
|
|
230
230
|
|
|
231
231
|
//("Example", ref showExampleDetail, DrawGUI_ExampleScene);
|
|
232
|
+
|
|
233
|
+
if (GUILayout.Button("Clear All Data"))
|
|
234
|
+
{
|
|
235
|
+
GDKFileUtils.ClearCacheData();
|
|
236
|
+
}
|
|
232
237
|
}
|
|
233
238
|
|
|
234
239
|
private static void DrawVersion(string label, string version)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -93,6 +93,23 @@ namespace Amanotes.Core
|
|
|
93
93
|
LogWarning("[RemoteConfig] No embed remote config available");
|
|
94
94
|
adapterConfig.embedRemoteConfig.SetActiveConfig(id);
|
|
95
95
|
}
|
|
96
|
+
|
|
97
|
+
public static void Save()
|
|
98
|
+
{
|
|
99
|
+
StringBuilder sb = new StringBuilder();
|
|
100
|
+
|
|
101
|
+
//Add embedded remote config version to force load from embedded config after app update
|
|
102
|
+
sb.AppendLine($"{VERSION_PREFIX}{EmbedVersion}");
|
|
103
|
+
|
|
104
|
+
foreach (var c in dictConfig)
|
|
105
|
+
{
|
|
106
|
+
sb.AppendLine($"{c.Key}\t{Encode(c.Value)}");
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
string filePath = GDKFileUtils.GetPath(fileName);
|
|
110
|
+
GDKFileUtils.Save(filePath, sb.ToString());
|
|
111
|
+
Log($"[RemoteConfig] Saved remote config to {filePath}");
|
|
112
|
+
}
|
|
96
113
|
}
|
|
97
114
|
|
|
98
115
|
public partial class RemoteConfig //Internal
|
|
@@ -197,19 +214,14 @@ namespace Amanotes.Core
|
|
|
197
214
|
static void SaveCache()
|
|
198
215
|
{
|
|
199
216
|
_state = FetchState.SaveCache;
|
|
200
|
-
StringBuilder sb = new StringBuilder();
|
|
201
|
-
|
|
202
|
-
//Add embedded remote config version to force load from embedded config after app update
|
|
203
|
-
sb.AppendLine($"{VERSION_PREFIX}{EmbedVersion}");
|
|
204
217
|
|
|
205
|
-
|
|
218
|
+
if (!adapterConfig.autoSaveCache)
|
|
206
219
|
{
|
|
207
|
-
|
|
220
|
+
NextState();
|
|
221
|
+
return;
|
|
208
222
|
}
|
|
209
223
|
|
|
210
|
-
|
|
211
|
-
GDKFileUtils.Save(filePath, sb.ToString());
|
|
212
|
-
Log($"[RemoteConfig] Saved remote config to {filePath}");
|
|
224
|
+
Save();
|
|
213
225
|
NextState();
|
|
214
226
|
}
|
|
215
227
|
|
|
@@ -365,6 +377,7 @@ namespace Amanotes.Core.Internal
|
|
|
365
377
|
internal EmbedRemoteConfigAsset embedRemoteConfig;
|
|
366
378
|
public float firstFetchTimeOutInSeconds = 10;
|
|
367
379
|
public float defaultTimeOutInSeconds = 3;
|
|
380
|
+
public bool autoSaveCache = true;
|
|
368
381
|
}
|
|
369
382
|
|
|
370
383
|
public interface IRemoteConfig
|
package/Runtime/AmaGDK.Utils.cs
CHANGED
|
@@ -168,13 +168,13 @@ namespace Amanotes.Core.Internal
|
|
|
168
168
|
StringBuilder logBuilder = new StringBuilder();
|
|
169
169
|
logBuilder.AppendLine("[AmaGDK] All cached data & stats cleared");
|
|
170
170
|
|
|
171
|
-
if (!Directory.Exists(
|
|
171
|
+
if (!Directory.Exists(basePath))
|
|
172
172
|
{
|
|
173
|
-
logBuilder.AppendLine("Cache path not exists: " +
|
|
173
|
+
logBuilder.AppendLine("Cache path not exists: " + basePath);
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
string[] filePaths = Directory.GetFiles(
|
|
177
|
+
string[] filePaths = Directory.GetFiles(basePath);
|
|
178
178
|
foreach (string path in filePaths)
|
|
179
179
|
{
|
|
180
180
|
Delete(path);
|
package/Runtime/AmaGDK.cs
CHANGED