com.amanotes.gdk 0.2.20 → 0.2.21

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 CHANGED
@@ -1,152 +1,158 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.21 - 2023-10-11]
4
+ - RevenueCat adapter v6.0.0
5
+ - Handle early Firebase call
6
+ - Fix null exception in non-subscription game
7
+ - Add log level
8
+
3
9
  ## [0.2.20 - 2023-10-05]
4
- ### Update RevenueCat 5.3.0
10
+ - Update RevenueCat 5.3.0
5
11
 
6
12
  ## [0.2.19 - 2023-09-12]
7
- ### Add `ama_device_id` to all events
13
+ - Add `ama_device_id` to all events
8
14
 
9
15
  ## [0.2.18 - 2023-09-11]
10
- ### Add dev mode switch
11
- ### Auto get SDK version
12
- ### Add in-app purchase module, RevenueCat
13
- ### Support Unity 2019.4
14
- ### Remove AmaPassport
16
+ - Add dev mode switch
17
+ - Auto get SDK version
18
+ - Add in-app purchase module, RevenueCat
19
+ - Support Unity 2019.4
20
+ - Remove AmaPassport
15
21
 
16
22
  ## [0.2.14 - 2023-08-08]
17
- ### Support multiple embed remote config and load config by id
18
- ### Clear cached remote config on new app update
19
- ### Override remote config value in editor mode
20
- ### New feature: Analytics Quality
23
+ - Support multiple embed remote config and load config by id
24
+ - Clear cached remote config on new app update
25
+ - Override remote config value in editor mode
26
+ - New feature: Analytics Quality
21
27
 
22
28
  ## [0.2.13 - 2023-07-20]
23
- ### Fix error Remote Config JSON caused by special chars (", ', \)
29
+ - Fix error Remote Config JSON caused by special chars (", ', \)
24
30
 
25
31
  ## [0.2.12 - 2023-07-07]
26
- ### Restructure GDK - symlink GDK source to unity projects
27
- ### Unity 2019 compatible - no null coalescing
28
- ### Remove redundant AmaPassport config field
29
- ### Auto request AmaId
32
+ - Restructure GDK - symlink GDK source to unity projects
33
+ - Unity 2019 compatible - no null coalescing
34
+ - Remove redundant AmaPassport config field
35
+ - Auto request AmaId
30
36
 
31
37
  ## [0.2.11 - 2023-06-29]
32
- ### SetLogCondition with EventParam
33
- ### Rename Migrated -> HasMigrated
34
- ### Fix StopShowAd
38
+ - SetLogCondition with EventParam
39
+ - Rename Migrated -> HasMigrated
40
+ - Fix StopShowAd
35
41
 
36
42
  ## [0.2.10 - 2023-06-23]
37
- ### Extra package: Project Panel
38
- ### Remote config: Allow user to enable / disable automatic default valuye updating (in play mode)
39
- ### Fix ad routine
40
- ### Expose analytics migration flag
43
+ - Extra package: Project Panel
44
+ - Remote config: Allow user to enable / disable automatic default valuye updating (in play mode)
45
+ - Fix ad routine
46
+ - Expose analytics migration flag
41
47
 
42
48
  ## [0.2.9 - 2023-06-15]
43
- ### Show total init time
44
- ### Show adapter version + status at init time
45
- ### Remove AmaGDK version in debug log
46
- ### Remove "Params" in analytics debug log
47
- ### Check "event_name" early
48
- ### Fix null exception in AmaGDKInstaller
49
- ### Add csc.rsp to enable AMAGDK_DEV
50
- ### Update Ads module
49
+ - Show total init time
50
+ - Show adapter version + status at init time
51
+ - Remove AmaGDK version in debug log
52
+ - Remove "Params" in analytics debug log
53
+ - Check "event_name" early
54
+ - Fix null exception in AmaGDKInstaller
55
+ - Add csc.rsp to enable AMAGDK_DEV
56
+ - Update Ads module
51
57
 
52
58
  ## [0.2.8 - 2023-06-12]
53
- ### Mute Appsflyer's init log on Editor
54
- ### Clear analytics log in adapters
55
- ### Check null event params before calling AddParam()
56
- ### Export AmaPassport info
59
+ - Mute Appsflyer's init log on Editor
60
+ - Clear analytics log in adapters
61
+ - Check null event params before calling AddParam()
62
+ - Export AmaPassport info
57
63
 
58
64
  ## [0.2.7 - 2023-06-09]
59
- ### Fix log single adapter
65
+ - Fix log single adapter
60
66
 
61
67
  ## [0.2.6 - 2023-06-08]
62
- ### Update AmaPassport
63
- ### Fix JSON parse in RemoteConfig
64
- ### Ads adds interstitial callbacks
65
- ### Clean & export AmaGDK Installer
68
+ - Update AmaPassport
69
+ - Fix JSON parse in RemoteConfig
70
+ - Ads adds interstitial callbacks
71
+ - Clean & export AmaGDK Installer
66
72
 
67
73
  ## [0.2.5 - 2023-06-07]
68
- ### Remove ATT dependency package
74
+ - Remove ATT dependency package
69
75
 
70
76
  ## [0.2.4 - 2023-06-07]
71
- ### Hotfix Ads module
72
- ### Update Analytics unit tests
77
+ - Hotfix Ads module
78
+ - Update Analytics unit tests
73
79
 
74
80
  ## [0.2.3 - 2023-06-06]
75
- ### Refactor Ads module, support ironSource
76
- ### Refactor AmaPassport
77
- ### Refactor AmaGDK structure
78
- ### Add callback when RemoteConfig module completes fetching
81
+ - Refactor Ads module, support ironSource
82
+ - Refactor AmaPassport
83
+ - Refactor AmaGDK structure
84
+ - Add callback when RemoteConfig module completes fetching
79
85
 
80
86
  ## [0.1.20 - 2023-04-20]
81
- ### Refactor Adapter architure to support reading adapter config from Core
82
- ### Add session stat for Analytics module
83
- ### Unit test for Json parser and Analytics module
87
+ - Refactor Adapter architure to support reading adapter config from Core
88
+ - Add session stat for Analytics module
89
+ - Unit test for Json parser and Analytics module
84
90
 
85
91
  ## [0.1.19 - 2023-04-11]
86
- ### Move AmaGDKTest out of AmaGDKCore
92
+ - Move AmaGDKTest out of AmaGDKCore
87
93
 
88
94
  ## [0.1.18 - 2023-03-27]
89
- ### Fix AmaGDK's autoInit saving issue
95
+ - Fix AmaGDK's autoInit saving issue
90
96
 
91
97
  ## [0.1.17 - 2023-03-13]
92
- ### Release AmaGDK v0.1.17
93
- ### Rename Analytics APIs
98
+ - Release AmaGDK v0.1.17
99
+ - Rename Analytics APIs
94
100
 
95
101
  ## [0.1.16 - 2023-03-10]
96
- ### Release AmaGDK v0.1.16
97
- ### SemVer supports 4 parts
98
- ### Analytics supports EventConfig
102
+ - Release AmaGDK v0.1.16
103
+ - SemVer supports 4 parts
104
+ - Analytics supports EventConfig
99
105
 
100
106
  ## [0.1.15 - 2023-03-06]
101
- ### Release AmaGDK v0.1.15
102
- ### Fix null exception in VersionExtractor
103
- ### Warn unhandle platform in Appsflyer initialization
104
- ### Allow dev to SetPermittedEvents and SetForbiddenEvents to the adapter config
107
+ - Release AmaGDK v0.1.15
108
+ - Fix null exception in VersionExtractor
109
+ - Warn unhandle platform in Appsflyer initialization
110
+ - Allow dev to SetPermittedEvents and SetForbiddenEvents to the adapter config
105
111
 
106
112
  ## [0.1.14 - 2023-03-02]
107
- ### Release AmaGDK v0.1.14
113
+ - Release AmaGDK v0.1.14
108
114
 
109
115
  ## [0.1.13 - 2023-03-01]
110
- ### Release AmaGDK v0.1.13
111
- ### Fix Semver parser
116
+ - Release AmaGDK v0.1.13
117
+ - Fix Semver parser
112
118
 
113
119
  ## [0.1.12 - 2023-03-01]
114
- ### Release AmaGDK v0.1.12
115
- ### Prioritize analytics instant config over the base config
116
- ### Public common config
120
+ - Release AmaGDK v0.1.12
121
+ - Prioritize analytics instant config over the base config
122
+ - Public common config
117
123
 
118
124
  ## [0.1.11 - 2023-02-28]
119
- ### Release AmaGDK v0.1.11
120
- ### Auto start and log Appsflyer open session
121
- ### Add analytics adapter base config
122
- ### Analytics: count by session
123
- ### Export example scene
124
- ### Add AmaGDKManager
125
- ### Refactor Adapter to support for init order configuration
125
+ - Release AmaGDK v0.1.11
126
+ - Auto start and log Appsflyer open session
127
+ - Add analytics adapter base config
128
+ - Analytics: count by session
129
+ - Export example scene
130
+ - Add AmaGDKManager
131
+ - Refactor Adapter to support for init order configuration
126
132
 
127
133
  ## [0.1.10 - 2023-02-17]
128
- ### Release AmaGDK v0.1.10
134
+ - Release AmaGDK v0.1.10
129
135
 
130
136
  ## [0.1.9 - 2023-02-15]
131
- ### Release AmaGDK v0.1.9
132
- ### Change Documentation URL
133
- ### Support API LogEvent(eventName, parameters)
137
+ - Release AmaGDK v0.1.9
138
+ - Change Documentation URL
139
+ - Support API LogEvent(eventName, parameters)
134
140
 
135
141
  ## [0.1.8 - 2023-02-15]
136
- ### Release AmaGDK v0.1.8
137
- ### Add AdapterID
142
+ - Release AmaGDK v0.1.8
143
+ - Add AdapterID
138
144
 
139
145
  ## [0.1.5 - 2023-02-13]
140
- ### Release AmaSDK v0.1.5
141
- ### Validate EventParams
146
+ - Release AmaSDK v0.1.5
147
+ - Validate EventParams
142
148
 
143
149
  ## [0.1.4 - 2023-02-13]
144
- ### Release AmaSDK v0.1.4
150
+ - Release AmaSDK v0.1.4
145
151
 
146
152
  ## [0.1.3 - 2023-02-10]
147
- ### Release AmaSDK v0.1.3
153
+ - Release AmaSDK v0.1.3
148
154
 
149
155
  ## [0.1.2] - 2023-02-08
150
- ### Release AmaGDK 0.1.2
151
- ### FirebaseAnalytics adapter compatible with FirebaseAnalytics SDK v9
152
- ### AppsFlyer adapter compatible with AppsFlyer SDK v6
156
+ - Release AmaGDK 0.1.2
157
+ - FirebaseAnalytics adapter compatible with FirebaseAnalytics SDK v9
158
+ - AppsFlyer adapter compatible with AppsFlyer SDK v6
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 7549d4283e5844b68b594b1dcb4add02
2
+ guid: 8143c4447d1894317ac84680e221eec3
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
package/README.md CHANGED
@@ -1,12 +1,57 @@
1
1
  # Amanotes GDK
2
2
 
3
- ### Before you begin
3
+ ## AmaGDK Dev Project Setup
4
4
 
5
- AmaGDK is a free library from Amanotes provides classes, interfaces and adapter packages for Unity game development.
5
+ ### Clone Project From GitLab
6
6
 
7
- # Amanotes GDK for your game
7
+ 1. Clone project from GitLab url: https://gitlab.amanotes.net/sdk/AmaSDK_v5
8
+ 2. Open terminal windows and cd to your project
9
+ 3. Run file create-links.sh (Link GDK folder children to GDKDev)
8
10
 
9
- # Getting started with AmaGDK
11
+ ![image](https://drive.google.com/uc?id=1mlilsAOxjRRqWbQPI-tSUDJamZiY01rm)
12
+
13
+ ### How To Open Project
14
+
15
+ * Open project GDKDev
16
+
17
+ ![image](https://drive.google.com/uc?id=1N2kM3N-LU22pgY_3Uhyq-YZdCmDTPxJa)
18
+
19
+ ### Main folder
20
+
21
+ * AmaGDK: adapters logic, example, installer, configs
22
+
23
+ * AmaGDKCore: core logic, packages
24
+
25
+ * AmaGDKDev: tools for dev as build tool, release tool
26
+
27
+ * AmaGDKTest: scenes test, unit test
28
+
29
+ ![image](https://drive.google.com/uc?id=1iYskLfKqFG95Ezsf_hUotnlHnTaAMTfW)
30
+
31
+ ### Switch To Dev Mode
32
+
33
+ 1. Add GDK_HOME variable to .zshrc file in Mac OS
34
+
35
+ * Step 1: Open terminal, input sudo nano `~/.zshrc`
36
+
37
+ * Step 2: Enter and input password, add new line export `GDK_HOME=/AmaGDKCoreFolderPath`
38
+
39
+ * Step 3: Press Ctr+X buttons -> Press Y button -> Press `Enter` button to save
40
+
41
+ ![image](https://drive.google.com/uc?id=11hUbHwTpkLuEhe3hjQEkaiTuJ0fNCR7X)
42
+
43
+ 2. Select AmaGDK prefab in scene → select `Change Dev Mode` in context menu
44
+
45
+ ![image](https://drive.google.com/uc?id=1tmbtcK9FmZf21HHpQYyICf5dN9FKUeKN)
46
+
47
+ ### Code Convention
48
+ [Convention](https://amanotesjsc.atlassian.net/wiki/spaces/AP/pages/3409413152)
49
+
50
+ ### Links Reference
51
+ [Reference](https://amanotesjsc.atlassian.net/wiki/spaces/AP/pages/3334930473)
52
+
53
+
54
+ ## Getting started with AmaGDK
10
55
 
11
56
  ### Add AmaGDK prefab to your bootstrap scene (the first scene in your game build settings)
12
57
  There are two ways to do:
@@ -35,10 +80,10 @@ public class YourGameSceneController
35
80
  }
36
81
  ```
37
82
 
38
- # Versioning
83
+ ### Versioning
39
84
 
40
85
  We use [SemVer](http://semver.org/) for versioning.
41
86
 
42
- # License
87
+ ### License
43
88
 
44
89
  This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
@@ -136,30 +136,12 @@ namespace Amanotes.Core
136
136
 
137
137
  public static void SetUserId(string userId)
138
138
  {
139
- if (listAdapters.Count == 0)
140
- {
141
- LogWarningOnce("ListAnalyticsAdapter is empty! Maybe you need to wait for Analytics to init");
142
- return;
143
- }
144
-
145
- foreach (AdapterContext s in listAdapters)
146
- {
147
- s.GetAdapterApi<IAnalyticAdapter>().SetUserId(userId);
148
- }
139
+ actionQueue.Enqueue(() => InternalSetUserId(userId));
149
140
  }
150
141
 
151
142
  public static void SetUserProperty(string key, string value)
152
143
  {
153
- if (listAdapters.Count == 0)
154
- {
155
- LogWarningOnce("ListAnalyticsAdapter is empty! Maybe you need to wait for Analytics to init");
156
- return;
157
- }
158
-
159
- foreach (AdapterContext s in listAdapters)
160
- {
161
- s.GetAdapterApi<IAnalyticAdapter>().SetUserProperty(key, value);
162
- }
144
+ actionQueue.Enqueue(() => InternalSetUserProperty(key, value));
163
145
  }
164
146
 
165
147
  private static IntegrityFlag MergeData(List<string> funnelEvents, Dictionary<string, int> eventCountMap, bool sumEventCount)
@@ -285,6 +267,7 @@ namespace Amanotes.Core
285
267
  internal static readonly Dictionary<string, EventConfig> sendAtCount = new Dictionary<string, EventConfig>();
286
268
  internal static Predicate<EventParams> logEventHook = null;
287
269
  internal static readonly Queue<EventParams> eventQueue = new Queue<EventParams>();
270
+ internal static readonly Queue<Action> actionQueue = new Queue<Action>();
288
271
  internal static readonly List<AdapterContext> listAdapters = new List<AdapterContext>();
289
272
  internal static readonly AnalyticsData localData = new AnalyticsData().LoadJsonFromFile();
290
273
  internal static readonly SessionStat sessionStat = new SessionStat();
@@ -296,6 +279,9 @@ namespace Amanotes.Core
296
279
 
297
280
  onFrameUpdate -= ProcessEventQueue;
298
281
  onFrameUpdate += ProcessEventQueue;
282
+
283
+ onFrameUpdate -= ProcessActionQueue;
284
+ onFrameUpdate += ProcessActionQueue;
299
285
  }
300
286
 
301
287
  internal static void ProcessEventQueue()
@@ -389,7 +375,7 @@ namespace Amanotes.Core
389
375
  sb.AppendLine($" - Malformed eventName (should not contains <space> or <dash>: <{eventName}>");
390
376
  }
391
377
  }
392
-
378
+
393
379
  if (!char.IsLetter(eventName[0])) sb.AppendLine($" - EventName must start with a letter: <{eventName}> ");
394
380
  if (eventName.Length > 40) sb.AppendLine($" - EventName is too long ({eventName.Length} > 40): <{eventName}> ");
395
381
  if (sb.Length > 0 && dryRun) LogWarningOnce(sb.ToString(), $"NormalizeEventName<{eventName}>");
@@ -418,6 +404,33 @@ namespace Amanotes.Core
418
404
 
419
405
  return true;
420
406
  }
407
+
408
+
409
+ internal static void ProcessActionQueue()
410
+ {
411
+ if (actionQueue.Count <= 0) return;
412
+ while (actionQueue.Count > 0)
413
+ {
414
+ var action = actionQueue.Dequeue();
415
+ action.Invoke();
416
+ }
417
+ }
418
+
419
+ internal static void InternalSetUserId(string userId)
420
+ {
421
+ foreach (AdapterContext s in listAdapters)
422
+ {
423
+ s.GetAdapterApi<IAnalyticAdapter>().SetUserId(userId);
424
+ }
425
+ }
426
+
427
+ internal static void InternalSetUserProperty(string key, string value)
428
+ {
429
+ foreach (AdapterContext s in listAdapters)
430
+ {
431
+ s.GetAdapterApi<IAnalyticAdapter>().SetUserProperty(key, value);
432
+ }
433
+ }
421
434
  }
422
435
 
423
436
  //PERSISTENT DATA
@@ -83,10 +83,19 @@ namespace Amanotes.Core.Internal
83
83
  #endif
84
84
  }
85
85
 
86
+ [Flags]
87
+ public enum LogLevel
88
+ {
89
+ None = 0,
90
+ Error = 1,
91
+ Warning = 2,
92
+ Verbose = 4
93
+ }
94
+
86
95
  [Serializable]
87
96
  public partial class SDKConfig
88
97
  {
89
- public bool verboseLog;
98
+ public LogLevel logLevel = LogLevel.Warning | LogLevel.Error;
90
99
  }
91
100
 
92
101
  [Serializable]
@@ -438,7 +438,7 @@ namespace Amanotes.Core.Internal
438
438
  }
439
439
  onSuccess?.Invoke(dicProducts);
440
440
  return;
441
- #endif
441
+ #else
442
442
 
443
443
  getProdQueue.Clear();
444
444
  var subs = new List<string>();
@@ -468,6 +468,7 @@ namespace Amanotes.Core.Internal
468
468
  getProdQueue.Enqueue((cons, ProductType.Consumable));
469
469
  getProdQueue.Enqueue((nons, ProductType.NonConsumable));
470
470
  GetNextProductsInQueue();
471
+ #endif
471
472
  }
472
473
 
473
474
  void GetNextProductsInQueue()
@@ -68,6 +68,7 @@ namespace Amanotes.Core.Internal
68
68
 
69
69
  public static void LogWarningOnce(string message, string key = null)
70
70
  {
71
+ if ((Config.common.logLevel & LogLevel.Warning) == 0) return;
71
72
  if (string.IsNullOrEmpty(key)) key = message;
72
73
  if (logWarningDict.Contains(key)) return;
73
74
  logWarningDict.Add(key);
@@ -75,15 +76,15 @@ namespace Amanotes.Core.Internal
75
76
  }
76
77
  public static void LogWarning(string message)
77
78
  {
78
- Debug.LogWarning($"AmaGDK {message}");
79
+ if ((Config.common.logLevel & LogLevel.Warning) != 0) Debug.LogWarning($"AmaGDK {message}");
79
80
  }
80
81
  public static void LogError(string message)
81
82
  {
82
- Debug.LogError($"AmaGDK {message}");
83
+ if ((Config.common.logLevel & LogLevel.Error) != 0) Debug.LogError($"AmaGDK {message}");
83
84
  }
84
85
  public static void Log(string message)
85
86
  {
86
- if (AmaGDK.Config.common.verboseLog) Debug.Log($"AmaGDK {message}");
87
+ if ((Config.common.logLevel & LogLevel.Verbose) != 0) Debug.Log($"AmaGDK {message}");
87
88
  }
88
89
  }
89
90
 
@@ -91,10 +92,10 @@ namespace Amanotes.Core.Internal
91
92
  {
92
93
  public static void DestroyAndReset()
93
94
  {
94
- if (AmaGDK._instance != null)
95
+ if (_instance != null)
95
96
  {
96
- UnityObject.Destroy(AmaGDK._instance);
97
- AmaGDK._instance = null;
97
+ UnityObject.Destroy(_instance);
98
+ _instance = null;
98
99
  }
99
100
 
100
101
  AmaGDK[] result = Resources.FindObjectsOfTypeAll<AmaGDK>();
@@ -113,8 +114,8 @@ namespace Amanotes.Core.Internal
113
114
  UnityObject.Destroy(result[i].gameObject);
114
115
  }
115
116
 
116
- AmaGDK._status = Status.None;
117
- AmaGDK._allowInit = false;
117
+ _status = Status.None;
118
+ _allowInit = false;
118
119
 
119
120
  // TODO: Destroy adapters? - Don't do this. An adapter registers just 1 time. Clear adapters cause Analytics test fail.
120
121
  //Adapter.listAdapters.Clear();
@@ -1,11 +1,12 @@
1
1
  using System;
2
+ using System.Collections;
2
3
  using Amanotes.Core.Internal;
3
4
  using UnityEngine;
4
5
  namespace Amanotes.Core
5
6
  {
6
7
  public partial class AmaGDK //User profile
7
8
  {
8
- public static readonly UserProfile User = new UserProfile().Load();
9
+ public static readonly UserProfile User = new UserProfile();
9
10
 
10
11
  [Serializable]
11
12
  public partial class UserProfile : IJsonFile
@@ -18,14 +19,6 @@ namespace Amanotes.Core
18
19
  GDKFileUtils.Save(FILE_NAME, JsonUtility.ToJson(this));
19
20
  }
20
21
 
21
- internal UserProfile Load()
22
- {
23
- string json = GDKFileUtils.Load(FILE_NAME);
24
- if (string.IsNullOrEmpty(json)) return this;
25
- JsonUtility.FromJsonOverwrite(json, this);
26
- return this;
27
- }
28
-
29
22
  internal void SaveIfDirty()
30
23
  {
31
24
  if (!_dirty) return;
@@ -57,10 +50,26 @@ namespace Amanotes.Core
57
50
  private string appsFlyerId;
58
51
 
59
52
  private const string AMA_DEVICE_ID_KEY = "ama_device_id";
53
+ private const float TIME_OUT = 5f;
54
+ private const float WAIT_TIME = 0.5f;
55
+ private WaitForSeconds waitForDuration = new WaitForSeconds(WAIT_TIME);
60
56
 
61
- internal void InitUserProfile()
57
+ internal IEnumerator Init()
62
58
  {
63
- if (!IsAmaDeviceIdExist()) GetAdvertisingId();
59
+ User.LoadJsonFromFile();
60
+ if (IsAmaDeviceIdExist()) yield break;
61
+
62
+ GetAdvertisingId();
63
+
64
+ float time = 0;
65
+ while (!User.IsAmaDeviceIdExist())
66
+ {
67
+ yield return waitForDuration;
68
+ time += WAIT_TIME;
69
+ if (time <= TIME_OUT) continue;
70
+ Logging.LogWarning($"User init time out: {TIME_OUT}");
71
+ break;
72
+ }
64
73
  }
65
74
 
66
75
  private bool IsAmaDeviceIdExist()
@@ -118,7 +127,7 @@ namespace Amanotes.Core
118
127
  break;
119
128
 
120
129
  default:
121
- Logging.LogWarning($"Not support ama_device_id on: {Application.platform}");
130
+ amaDeviceId = SystemInfo.deviceUniqueIdentifier;
122
131
  break;
123
132
  }
124
133
  Logging.Log($"Generate AmaDeviceId completed: {amaDeviceId}");
package/Runtime/AmaGDK.cs CHANGED
@@ -14,7 +14,7 @@ namespace Amanotes.Core
14
14
  {
15
15
  public partial class AmaGDK : MonoBehaviour
16
16
  {
17
- public const string VERSION = "0.2.20";
17
+ public const string VERSION = "0.2.21";
18
18
 
19
19
  internal static AmaGDK _instance;
20
20
  internal static Status _status = Status.None;
@@ -61,6 +61,8 @@ namespace Amanotes.Core
61
61
  throw new Exception("[AmaGDK] " + CONFIG_NOT_FOUND);
62
62
  }
63
63
 
64
+ yield return User.Init();
65
+
64
66
  float time = 0;
65
67
  float timeout = 10;
66
68
 
@@ -106,7 +108,6 @@ namespace Amanotes.Core
106
108
  }
107
109
 
108
110
  // Init modules (Adapter managers)
109
- User.InitUserProfile();
110
111
  Analytics.Init();
111
112
  Ads.Init();
112
113
  IAP.Init();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2019.4",