com.amanotes.gdk 0.2.85 → 0.2.87

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 (45) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/Editor/Extra/GDKCIBuildCommand.cs +19 -2
  3. package/Editor/Extra/GDKLocalBuild.cs +25 -1
  4. package/Editor/Extra/SDKVersionTracking.cs +9 -1
  5. package/Editor/Utils/AmaGDKEditor.ExtractVersion.Max.cs +120 -0
  6. package/Editor/Utils/AmaGDKEditor.ExtractVersion.Max.cs.meta +3 -0
  7. package/Editor/Utils/AmaGDKEditor.ExtractVersion.cs +8 -10
  8. package/Extra/AmaGDKInstaller.unitypackage +0 -0
  9. package/Extra/AutoEventQC.unitypackage +0 -0
  10. package/Extra/CheckDiskSpace.unitypackage +0 -0
  11. package/Extra/Consent.unitypackage +0 -0
  12. package/Extra/CrashlyticHook.unitypackage +0 -0
  13. package/Extra/ForceUpdate.unitypackage +0 -0
  14. package/Extra/LegacyGDKUpdateHelper.unitypackage +0 -0
  15. package/Extra/PostProcessor.unitypackage +0 -0
  16. package/Packages/AmaGDKConfig.unitypackage +0 -0
  17. package/Packages/AmaGDKExample.unitypackage +0 -0
  18. package/Packages/AmaGDKTest.unitypackage +0 -0
  19. package/Packages/AppsFlyerAdapter.PurchaseConnector.unitypackage +0 -0
  20. package/Packages/AppsFlyerAdapter.unitypackage +0 -0
  21. package/Packages/FirebaseAnalyticsAdapter.unitypackage +0 -0
  22. package/Packages/FirebaseRemoteConfigAdapter.unitypackage +0 -0
  23. package/Packages/IronSourceAdapter.AdQuality.unitypackage +0 -0
  24. package/Packages/IronSourceAdapter.unitypackage +0 -0
  25. package/Packages/MaxAdNetworkAdapter.unitypackage +0 -0
  26. package/Packages/RevenueCatAdapter.unitypackage +0 -0
  27. package/Packages/SqliteAnalyticsAdapter.unitypackage +0 -0
  28. package/Runtime/Ad/AdLogic.cs +230 -148
  29. package/Runtime/AmaGDK.Adapters.cs +2 -0
  30. package/Runtime/AmaGDK.Analytics.cs +140 -78
  31. package/Runtime/AmaGDK.RemoteConfig.cs +50 -40
  32. package/Runtime/AmaGDK.Singleton.cs +2 -0
  33. package/Runtime/AmaGDK.cs +3 -1
  34. package/Runtime/AnalyticQualityAsset.cs +69 -38
  35. package/Runtime/AudioToolkit/Plugins/AudioDeviceDetector.cs +31 -17
  36. package/Runtime/Core/GDKDispatcher.cs +4 -2
  37. package/Runtime/Core/GDKSemVer.cs +23 -26
  38. package/Runtime/Fps/AmaFPSVisualizer.cs +48 -26
  39. package/Runtime/Internal/AmaGDK.Utils.cs +90 -46
  40. package/Runtime/Internal/ForceQuitMonitor.cs +43 -31
  41. package/Runtime/Klavar/Attributes/MinMaxAttribute.cs +12 -3
  42. package/Runtime/UI/ScrollView/GDKScrollView.cs +83 -48
  43. package/Runtime/Utils/GDKFileUtils.cs +3 -8
  44. package/Runtime/Utils/GDKUtils.cs +20 -8
  45. package/package.json +1 -1
@@ -70,7 +70,7 @@ namespace Amanotes.Core.Internal
70
70
  }
71
71
 
72
72
  internal static int writePendingCount => _pendingWrites.Count;
73
- internal static bool HasAnyWritePending => _pendingWrites.Count > 0;
73
+ internal static bool HasAnyWritePending => _pendingWrites.Count > 0 || _isProcessing != 0;
74
74
  internal static bool IsWritePending(string fileName)
75
75
  {
76
76
  return !string.IsNullOrEmpty(fileName) && _pendingWrites.ContainsKey(fileName);
@@ -254,14 +254,9 @@ namespace Amanotes.Core.Internal
254
254
  try
255
255
  {
256
256
  var operation = request.SendWebRequest();
257
- while (!operation.isDone)
258
- {
259
- await Task.Yield();
260
- }
257
+ while (!operation.isDone) await Task.Yield();
261
258
 
262
- return request.result != UnityWebRequest.Result.Success
263
- ? null
264
- : request.downloadHandler.text;
259
+ return request.result != UnityWebRequest.Result.Success ? null : request.downloadHandler.text;
265
260
  } catch (Exception ex)
266
261
  {
267
262
  LogError($"[GDKFileUtils] StreamingAssets load error: {ex.Message}");
@@ -105,6 +105,12 @@ namespace Amanotes.Core.Internal
105
105
  yield return new WaitForSecondsRealtime(duration);
106
106
  yield break;
107
107
  }
108
+
109
+ yield return WaitForSecondsWithFocusHandling(duration);
110
+ }
111
+
112
+ private static IEnumerator WaitForSecondsWithFocusHandling(float duration)
113
+ {
108
114
  float elapsedTime = 0f;
109
115
  float lastTimeStamp = Time.realtimeSinceStartup;
110
116
  bool focusChangedSinceLastFrame = false;
@@ -115,19 +121,25 @@ namespace Amanotes.Core.Internal
115
121
  {
116
122
  if (Application.isFocused)
117
123
  {
118
- if (focusChangedSinceLastFrame)
119
- {
120
- lastTimeStamp = Time.realtimeSinceStartup;
121
- focusChangedSinceLastFrame = false;
122
- }
123
-
124
- elapsedTime += Time.realtimeSinceStartup - lastTimeStamp;
125
- lastTimeStamp = Time.realtimeSinceStartup;
124
+ elapsedTime = UpdateElapsedTime(elapsedTime, ref lastTimeStamp, ref focusChangedSinceLastFrame);
126
125
  }
127
126
 
128
127
  yield return null;
129
128
  }
130
129
  Application.focusChanged -= onApplicationFocusCallback;
131
130
  }
131
+
132
+ private static float UpdateElapsedTime(float elapsedTime, ref float lastTimeStamp, ref bool focusChangedSinceLastFrame)
133
+ {
134
+ if (focusChangedSinceLastFrame)
135
+ {
136
+ lastTimeStamp = Time.realtimeSinceStartup;
137
+ focusChangedSinceLastFrame = false;
138
+ }
139
+
140
+ elapsedTime += Time.realtimeSinceStartup - lastTimeStamp;
141
+ lastTimeStamp = Time.realtimeSinceStartup;
142
+ return elapsedTime;
143
+ }
132
144
  }
133
145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.2.85",
3
+ "version": "0.2.87",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2020.3",