com.amanotes.gdk 0.2.22 → 0.2.23

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,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.23 - 2023-10-18]
4
+ - Fix UserProfile out of main thread
5
+ - Handle multiple Firebase's dependency check
6
+
3
7
  ## [0.2.22 - 2023-10-11]
4
8
  - Get adapter info
5
9
 
Binary file
Binary file
Binary file
Binary file
Binary file
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.22";
17
+ public const string VERSION = "0.2.23";
18
18
 
19
19
  internal static AmaGDK _instance;
20
20
  internal static Status _status = Status.None;
@@ -25,6 +25,7 @@ namespace Amanotes.Core
25
25
 
26
26
  private static ConfigAsset _config = null;
27
27
  private static readonly Dictionary<string, AdapterInfo> _adapters = new Dictionary<string, AdapterInfo>();
28
+ private static readonly List<string> _firebaseServices = new List<string>() { AdapterID.FIREBASE_REMOTE_CONFIG, AdapterID.FIREBASE_ANALYTICS };
28
29
 
29
30
  internal static ConfigAsset Config
30
31
  {
@@ -56,7 +57,7 @@ namespace Amanotes.Core
56
57
  _allowInit = _allowInit || autoInit;
57
58
  StartCoroutine(InitRoutine());
58
59
  }
59
-
60
+
60
61
  IEnumerator InitRoutine()
61
62
  {
62
63
  if (Config == null)
@@ -64,7 +65,7 @@ namespace Amanotes.Core
64
65
  throw new Exception("[AmaGDK] " + CONFIG_NOT_FOUND);
65
66
  }
66
67
 
67
- yield return User.Init();
68
+ yield return StartCoroutine(User.Init());
68
69
 
69
70
  float time = 0;
70
71
  float timeout = 10;
@@ -95,7 +96,7 @@ namespace Amanotes.Core
95
96
  Log($"Initiating {adapter.adapterId} --> initOrder: {adapter.initOrder}");
96
97
  adapter.Init();
97
98
  RegisterUnityCallback(adapter);
98
-
99
+
99
100
  time = 0;
100
101
 
101
102
  while (!adapter.IsReady)
@@ -106,6 +107,11 @@ namespace Amanotes.Core
106
107
  LogWarning($"{adapter.adapterId} init time out: {timeout}");
107
108
  break;
108
109
  }
110
+
111
+ if (adapter.IsReady && _firebaseServices.Contains(adapter.adapterId))
112
+ {
113
+ firebaseResolved = true;
114
+ }
109
115
 
110
116
  var adapterInfo = new AdapterInfo(adapter.adapterId, adapter.adapterVersion, adapter.IsReady);
111
117
  _adapters.Add(adapter.adapterId, adapterInfo);
@@ -130,15 +136,13 @@ namespace Amanotes.Core
130
136
  {
131
137
  switch (adapter)
132
138
  {
133
- case IOnFrameUpdate a:
134
- {
139
+ case IOnFrameUpdate a: {
135
140
  onFrameUpdate -= a.OnFrameUpdate;
136
141
  onFrameUpdate += a.OnFrameUpdate;
137
142
  break;
138
143
  }
139
144
 
140
- case IOnApplicationPause a:
141
- {
145
+ case IOnApplicationPause a: {
142
146
  onApplicationPause -= a.OnApplicationPause;
143
147
  onApplicationPause += a.OnApplicationPause;
144
148
  break;
@@ -150,21 +154,22 @@ namespace Amanotes.Core
150
154
  applicationFocus += a.OnApplicationFocus;
151
155
  break;
152
156
  }
153
-
157
+
154
158
  case IOnApplicationQuit a:
155
159
  {
156
160
  applicationQuit -= a.OnApplicationQuit;
157
161
  applicationQuit += a.OnApplicationQuit;
158
- break;
162
+ break;
159
163
  }
160
164
  }
161
165
  }
162
-
166
+
163
167
  }
164
168
 
165
169
  public partial class AmaGDK // PUBLIC APIS
166
170
  {
167
171
  public static bool isReady => _status == Status.Ready;
172
+ public static bool firebaseResolved { get; private set; }
168
173
 
169
174
  public static void Init(Action onReady = null)
170
175
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2019.4",