com.amanotes.gdk 0.2.89 → 0.2.90

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,4 +1,4 @@
1
- ## [0.2.89] - 2025-08-05
1
+ ## [0.2.90] - 2025-08-05
2
2
  - [Fix] Null Exception when ad load failed
3
3
  - [Fix] Don't cancel unity build jobs
4
4
  - [Fix] Build Unity 2021
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/Runtime/AmaGDK.cs CHANGED
@@ -27,7 +27,7 @@ namespace Amanotes.Core
27
27
  {
28
28
  public partial class AmaGDK : MonoBehaviour
29
29
  {
30
- public const string VERSION = "0.2.89";
30
+ public const string VERSION = "0.2.90";
31
31
 
32
32
  internal static Status _status = Status.None;
33
33
  internal static ConfigAsset _config = null;
@@ -37,12 +37,20 @@ namespace Amanotes.Core.Internal
37
37
  byte[] bodyRaw = Encoding.UTF8.GetBytes(requestJson);
38
38
  uploadHandler = new UploadHandlerRaw(bodyRaw);
39
39
  downloadHandler = new DownloadHandlerBuffer();
40
- SetRequestHeader(new Dictionary<string, string>
41
- {
42
- { "Authorization", $"bearer {requestHeader}" },
43
- { "Content-Type", "application/json" },
44
- { "api-token", requestHeader }
45
- });
40
+ SetRequestHeader(
41
+ new Dictionary<string, string>
42
+ {
43
+ {
44
+ "Authorization", $"bearer {requestHeader}"
45
+ },
46
+ {
47
+ "Content-Type", "application/json"
48
+ },
49
+ {
50
+ "api-token", requestHeader
51
+ }
52
+ }
53
+ );
46
54
  yield return SendWebRequest();
47
55
 
48
56
  if (!string.IsNullOrEmpty(error))
@@ -101,7 +109,7 @@ namespace Amanotes.Core.Internal
101
109
  {
102
110
  return GDKUtils.StartCoroutine(PostJsonCoroutine(url, jsonData, onComplete, headers));
103
111
  }
104
-
112
+
105
113
  private static IEnumerator PostJsonCoroutine(string url, string jsonData,
106
114
  Action<bool, string> onComplete = null, Dictionary<string, string> headers = null)
107
115
  {
@@ -136,26 +144,17 @@ namespace Amanotes.Core.Internal
136
144
 
137
145
  public static IEnumerator CheckInternet(Action<bool> hasInternet)
138
146
  {
139
- try
140
- {
141
- UnityWebRequest www = UnityWebRequest.Get(AmaGDK.Config.common.internetCheckUrl);
142
- www.timeout = 10; // Set a reasonable timeout
143
- yield return www.SendWebRequest();
147
+ UnityWebRequest www = UnityWebRequest.Get(AmaGDK.Config.common.internetCheckUrl);
148
+ www.timeout = 10; // Set a reasonable timeout
149
+ yield return www.SendWebRequest();
144
150
 
145
- if (www.result != UnityWebRequest.Result.Success && www.responseCode != 429) //429 = Too many requests
146
- {
147
- hasInternet?.Invoke(false);
148
- yield break;
149
- }
150
-
151
- hasInternet?.Invoke(true);
152
- }
153
- catch (System.Exception ex)
151
+ if (www.result != UnityWebRequest.Result.Success && www.responseCode != 429) //429 = Too many requests
154
152
  {
155
- // Log the exception but assume no internet connection
156
- LogWarning($"Internet check failed with exception: {ex.Message}");
157
153
  hasInternet?.Invoke(false);
154
+ yield break;
158
155
  }
156
+
157
+ hasInternet?.Invoke(true);
159
158
  }
160
159
  }
161
160
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.2.89",
3
+ "version": "0.2.90",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2020.3",