app.hypergames.hypersdk 1.8.22 → 1.8.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,3 +1,10 @@
1
+ ## [1.8.23](https://github.com/mvmhyper/hyper-sdk/compare/v1.8.22...v1.8.23) (2026-07-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * signal tutorial availability before cache completes ([7a8d043](https://github.com/mvmhyper/hyper-sdk/commit/7a8d043e016c36007b088535f06ae5f4bb4ae64d))
7
+
1
8
  ## [1.8.22](https://github.com/mvmhyper/hyper-sdk/compare/v1.8.21...v1.8.22) (2026-07-08)
2
9
 
3
10
 
@@ -1644,6 +1644,12 @@ namespace Hyper.Internal.Managers
1644
1644
  {
1645
1645
  switch (result)
1646
1646
  {
1647
+ case "available":
1648
+ tutorialExistsButFailed = false;
1649
+ tutorialFetchSuccess = false;
1650
+ TutorialAvailability = TutorialAvailabilityState.Available;
1651
+ break;
1652
+
1647
1653
  case "success":
1648
1654
  _isFetchingTutorial = false;
1649
1655
  tutorialExistsButFailed = false;
@@ -1697,7 +1703,7 @@ namespace Hyper.Internal.Managers
1697
1703
 
1698
1704
  private bool IsTutorialFetchComplete()
1699
1705
  {
1700
- return TutorialAvailability == TutorialAvailabilityState.Available ||
1706
+ return (TutorialAvailability == TutorialAvailabilityState.Available && !_isFetchingTutorial) ||
1701
1707
  TutorialAvailability == TutorialAvailabilityState.Unavailable;
1702
1708
  }
1703
1709
 
@@ -8,6 +8,7 @@ mergeInto(LibraryManager.library, {
8
8
  const gameObject = UTF8ToString(gameObjectPtr);
9
9
 
10
10
  const endpoint = `${baseUrl}/games/${gameSlug}/tutorials`;
11
+ let tutorialRecordsFound = false;
11
12
 
12
13
  caches.open("tutorial-cache").then(async (cache) => {
13
14
  try {
@@ -22,6 +23,9 @@ mergeInto(LibraryManager.library, {
22
23
  return;
23
24
  }
24
25
 
26
+ tutorialRecordsFound = true;
27
+ SendMessage(gameObject, "OnTutorialCacheComplete", "available");
28
+
25
29
  const cards = records
26
30
  .filter(r => r && r.fileUrl)
27
31
  .map((record, index) => ({
@@ -48,7 +52,7 @@ mergeInto(LibraryManager.library, {
48
52
  SendMessage(gameObject, "OnTutorialCacheComplete", "success");
49
53
  } catch (e) {
50
54
  console.error("Tutorial caching error:", e);
51
- const status = e.message.includes("Download failed") ? "download_failed" : "fetch_failed";
55
+ const status = tutorialRecordsFound || e.message.includes("Download failed") ? "download_failed" : "fetch_failed";
52
56
  SendMessage(gameObject, "OnTutorialCacheComplete", status);
53
57
  }
54
58
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app.hypergames.hypersdk",
3
- "version": "1.8.22",
3
+ "version": "1.8.23",
4
4
  "displayName": "HyperSDK",
5
5
  "description": "Official Unity SDK for Hyper: multiplayer battles, leaderboards, deterministic RNG, session management, tutorials, and WebGL optimizations for production-ready games.",
6
6
  "unity": "6000.0",