app.hypergames.hypersdk 1.4.0 → 1.4.2

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,17 @@
1
+ ## [1.4.2](https://github.com/mvmhyper/hyper-sdk/compare/v1.4.1...v1.4.2) (2025-12-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * test Unity 2022 compatibility ([a3d642c](https://github.com/mvmhyper/hyper-sdk/commit/a3d642c3b132c5ef4d31a5dd0058ee6a2c3bf770))
7
+
8
+ ## [1.4.1](https://github.com/mvmhyper/hyper-sdk/compare/v1.4.0...v1.4.1) (2025-12-02)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * Add Build Target Platform check and Exit Game modal ([f2f1f9e](https://github.com/mvmhyper/hyper-sdk/commit/f2f1f9e6045b660465db93120b85ab1cb7d2e166))
14
+
1
15
  # [1.4.0](https://github.com/mvmhyper/hyper-sdk/compare/v1.3.4...v1.4.0) (2025-11-28)
2
16
 
3
17
 
@@ -581,6 +581,18 @@ namespace Hyper.Editor
581
581
  };
582
582
  CategorizeSettings(colorSpaceSetting, optimalSettings, recommendedSettings, outstandingSettings);
583
583
 
584
+ var buildTargetSetting = new SettingInfo
585
+ {
586
+ name = "Build Target Platform",
587
+ isOptimal = status.buildTarget == BuildTarget.WebGL,
588
+ current = $"• Current: {status.buildTarget}",
589
+ recommended = "• Recommended: WebGL",
590
+ description = "The Unity build target must be set to WebGL for HyperSDK builds. Building for Windows, Android, or any other platform will not work with the HyperGames platform.",
591
+ priority = SettingPriority.Critical,
592
+ type = SettingType.BuildTargetPlatform
593
+ };
594
+ CategorizeSettings(buildTargetSetting, optimalSettings, recommendedSettings, outstandingSettings);
595
+
584
596
  // Note: Texture compression is platform-specific (Android/iOS) and not applicable to WebGL builds
585
597
  // WebGL handles texture compression at runtime via browser support
586
598
  // This setting is kept for reference but won't affect WebGL builds
@@ -725,6 +737,15 @@ namespace Hyper.Editor
725
737
  };
726
738
  CategorizeSettings(colorSpaceSetting, optimal, recommended, outstanding);
727
739
 
740
+ var buildTargetSetting = new SettingInfo
741
+ {
742
+ name = "Build Target Platform",
743
+ isOptimal = status.buildTarget == BuildTarget.WebGL,
744
+ priority = SettingPriority.Critical,
745
+ type = SettingType.BuildTargetPlatform
746
+ };
747
+ CategorizeSettings(buildTargetSetting, optimal, recommended, outstanding);
748
+
728
749
  // Note: Texture compression is platform-specific and not applicable to WebGL builds
729
750
  }
730
751
 
@@ -1037,6 +1058,28 @@ namespace Hyper.Editor
1037
1058
  if (IsSDKDeveloper()) HyperDebug.LogSuccess("Applied: Color Space -> Gamma");
1038
1059
  break;
1039
1060
 
1061
+ case SettingType.BuildTargetPlatform:
1062
+ try
1063
+ {
1064
+ if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.WebGL)
1065
+ {
1066
+ EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.WebGL, BuildTarget.WebGL);
1067
+ if (IsSDKDeveloper()) HyperDebug.LogSuccess("Applied: Build Target -> WebGL");
1068
+ }
1069
+ }
1070
+ catch (System.Exception e)
1071
+ {
1072
+ EditorUtility.DisplayDialog(
1073
+ "Build Target Switch Failed",
1074
+ $"Could not switch build target to WebGL:\n\n{e.Message}\n\n" +
1075
+ "Please manually switch to WebGL in:\n" +
1076
+ "File > Build Settings > WebGL > Switch Platform",
1077
+ "OK"
1078
+ );
1079
+ HyperDebug.LogError($"Failed to switch build target: {e.Message}");
1080
+ }
1081
+ break;
1082
+
1040
1083
  case SettingType.TextureCompression:
1041
1084
  // Texture compression is platform-specific (Android/iOS) and not applicable to WebGL
1042
1085
  // WebGL handles texture compression at runtime via browser support
@@ -2501,7 +2544,8 @@ namespace Hyper.Editor
2501
2544
  MemoryGrowthMode,
2502
2545
  ShowSplashScreen,
2503
2546
  ColorSpace,
2504
- TextureCompression
2547
+ TextureCompression,
2548
+ BuildTargetPlatform
2505
2549
  }
2506
2550
 
2507
2551
  private class SettingInfo
@@ -2536,8 +2580,9 @@ namespace Hyper.Editor
2536
2580
  public ColorSpace colorSpace;
2537
2581
  public TextureImporterFormat textureCompression;
2538
2582
  public bool showSplashScreen;
2583
+ public BuildTarget buildTarget;
2539
2584
 
2540
- public int GetTotalSettings() => 16;
2585
+ public int GetTotalSettings() => 17;
2541
2586
 
2542
2587
  public int GetConfiguredSettings()
2543
2588
  {
@@ -2560,6 +2605,7 @@ namespace Hyper.Editor
2560
2605
  if (IsHyperLoaderTemplate(webGLTemplate)) count++;
2561
2606
  if (hyperLoaderAtIndex0) count++;
2562
2607
  if (colorSpace == ColorSpace.Gamma) count++;
2608
+ if (buildTarget == BuildTarget.WebGL) count++;
2563
2609
 
2564
2610
  return count;
2565
2611
  }
@@ -2717,6 +2763,9 @@ namespace Hyper.Editor
2717
2763
  // Setting to Automatic as placeholder (not used for WebGL)
2718
2764
  TextureImporterFormat defaultTexFormat = TextureImporterFormat.Automatic;
2719
2765
 
2766
+ // Get active build target
2767
+ BuildTarget activeBuildTarget = EditorUserBuildSettings.activeBuildTarget;
2768
+
2720
2769
  return new WebGLSettingsStatus
2721
2770
  {
2722
2771
  compressionFormat = PlayerSettings.WebGL.compressionFormat,
@@ -2737,7 +2786,8 @@ namespace Hyper.Editor
2737
2786
  memoryGrowthMode = memGrowthMode,
2738
2787
  showSplashScreen = PlayerSettings.SplashScreen.show,
2739
2788
  colorSpace = currentColorSpace,
2740
- textureCompression = defaultTexFormat
2789
+ textureCompression = defaultTexFormat,
2790
+ buildTarget = activeBuildTarget
2741
2791
  };
2742
2792
  }
2743
2793
 
@@ -127,14 +127,14 @@ namespace Hyper.Internal.Managers
127
127
  {
128
128
  ShowGameOverModal();
129
129
  }
130
-
130
+
131
131
  _eventManager.InvokeGameEndedEvent();
132
132
  }
133
133
 
134
134
  public void ExitPracticeMenu()
135
135
  {
136
136
  if (!IsBattleMode)
137
- HyperRuntime.BackendManager.LogEvent(ConsoleEventType.PracticeGameEnd);
137
+ ShowExitGameMenuModal();
138
138
  }
139
139
 
140
140
  #endregion
@@ -408,6 +408,16 @@ namespace Hyper.Internal.Managers
408
408
  }
409
409
  }
410
410
 
411
+ internal void ShowExitGameMenuModal()
412
+ {
413
+ if (IsInGameScene) return;
414
+
415
+ EnsureExitGameMenuModal();
416
+ _exitGameMenuModal.SetActive(true);
417
+
418
+ SetBlockerActive(true);
419
+ }
420
+
411
421
  internal void ShowGameOverModal()
412
422
  {
413
423
  if (IsBattleMode)
@@ -445,7 +455,7 @@ namespace Hyper.Internal.Managers
445
455
  internal void LoadPracticeMenuScene()
446
456
  {
447
457
  if (!HyperRuntime.GameContent.IsPracticeMenu) return;
448
-
458
+
449
459
  if (HyperRuntime.GameContent.HasTransitionScene)
450
460
  {
451
461
  StartCoroutine(PracticeMenuLoadingCoroutine());
@@ -884,6 +894,7 @@ namespace Hyper.Internal.Managers
884
894
  private GameObject _startGameDeadlineStatusBar;
885
895
  private GameObject _loadingFailedModal;
886
896
  private GameObject _sessionTimeOutModal;
897
+ private GameObject _exitGameMenuModal;
887
898
  private GameObject _scoreSubmissionFailedModalPortrait;
888
899
  private GameObject _scoreSubmissionFailedModalLandscape;
889
900
  private GameObject _retryTimeExpiredModalPortrait;
@@ -1117,6 +1128,30 @@ namespace Hyper.Internal.Managers
1117
1128
  _sessionTimeOutModal = InstantiateModal(prefab);
1118
1129
  }
1119
1130
 
1131
+ private void EnsureExitGameMenuModal()
1132
+ {
1133
+ if (_exitGameMenuModal != null)
1134
+ {
1135
+ _exitGameMenuModal.SetActive(true);
1136
+ return;
1137
+ }
1138
+
1139
+ if (_canvas == null) CreateCanvas();
1140
+
1141
+ GameObject prefab = Resources.Load<GameObject>("UIPrefabs/ExitGameMenuModal");
1142
+ _exitGameMenuModal = InstantiateModal(prefab);
1143
+ }
1144
+
1145
+ internal void HideExitGameMenuModal()
1146
+ {
1147
+ if (_exitGameMenuModal != null && _exitGameMenuModal.activeInHierarchy)
1148
+ {
1149
+ _exitGameMenuModal.SetActive(false);
1150
+ }
1151
+
1152
+ SetBlockerActive(false);
1153
+ }
1154
+
1120
1155
  private void EnsureScoreSubmissionFailedModal(bool portrait)
1121
1156
  {
1122
1157
  if (portrait && _scoreSubmissionFailedModalPortrait != null)
@@ -1395,7 +1430,7 @@ namespace Hyper.Internal.Managers
1395
1430
 
1396
1431
  _startingInstructionModal = instance;
1397
1432
  _startingInstructionModalComponent = instance.GetComponent<StartingInstructionModal>();
1398
-
1433
+
1399
1434
  // Configure the CTA text based on settings
1400
1435
  if (_startingInstructionModalComponent != null)
1401
1436
  {
@@ -0,0 +1,46 @@
1
+ using TMPro;
2
+ using UnityEngine;
3
+ using System.Runtime.InteropServices;
4
+ using Hyper.Internal.Managers;
5
+ using Hyper.Shared;
6
+
7
+ namespace Hyper.Internal
8
+ {
9
+ internal class ExitGameMenuModal : MonoBehaviour
10
+ {
11
+ [SerializeField] private CanvasGroup ctaButtonsHolder;
12
+ [SerializeField] private GameObject loadingCircle;
13
+ private GameManager _gameManager;
14
+
15
+ void Awake()
16
+ {
17
+ _gameManager = HyperRuntime.GameManager;
18
+ }
19
+
20
+ private void DisableButtonHolder()
21
+ {
22
+ ctaButtonsHolder.interactable = false;
23
+ ctaButtonsHolder.alpha = 0.6f;
24
+
25
+ loadingCircle.SetActive(true);
26
+ }
27
+
28
+ // Buttons
29
+ public void Exit()
30
+ {
31
+ DisableButtonHolder();
32
+ HyperRuntime.BackendManager.LogEvent(ConsoleEventType.PracticeGameEnd);
33
+ }
34
+
35
+ public void ContinuePlaying()
36
+ {
37
+ Hide();
38
+ }
39
+
40
+ private void Hide()
41
+ {
42
+ _gameManager.HideExitGameMenuModal();
43
+ }
44
+ }
45
+ }
46
+
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: a90f1b8b2fc0170469bee39da74afb1b
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -107,6 +107,6 @@ Material:
107
107
  - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
108
108
  - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
109
109
  - _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
110
- - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.13725491}
110
+ - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.19607843}
111
111
  m_BuildTextureStacks: []
112
112
  m_AllowLocking: 1
@@ -0,0 +1,195 @@
1
+ fileFormatVersion: 2
2
+ guid: 2da5702869eb4854eb1ec08c2800c40e
3
+ TextureImporter:
4
+ internalIDToNameTable:
5
+ - first:
6
+ 213: 4664437346796438651
7
+ second: fi_14618378_0
8
+ - first:
9
+ 213: 6756514946036899425
10
+ second: fi_14618378_1
11
+ externalObjects: {}
12
+ serializedVersion: 13
13
+ mipmaps:
14
+ mipMapMode: 0
15
+ enableMipMap: 0
16
+ sRGBTexture: 1
17
+ linearTexture: 0
18
+ fadeOut: 0
19
+ borderMipMap: 0
20
+ mipMapsPreserveCoverage: 0
21
+ alphaTestReferenceValue: 0.5
22
+ mipMapFadeDistanceStart: 1
23
+ mipMapFadeDistanceEnd: 3
24
+ bumpmap:
25
+ convertToNormalMap: 0
26
+ externalNormalMap: 0
27
+ heightScale: 0.25
28
+ normalMapFilter: 0
29
+ flipGreenChannel: 0
30
+ isReadable: 0
31
+ streamingMipmaps: 0
32
+ streamingMipmapsPriority: 0
33
+ vTOnly: 0
34
+ ignoreMipmapLimit: 0
35
+ grayScaleToAlpha: 0
36
+ generateCubemap: 6
37
+ cubemapConvolution: 0
38
+ seamlessCubemap: 0
39
+ textureFormat: 1
40
+ maxTextureSize: 2048
41
+ textureSettings:
42
+ serializedVersion: 2
43
+ filterMode: 1
44
+ aniso: 1
45
+ mipBias: 0
46
+ wrapU: 1
47
+ wrapV: 1
48
+ wrapW: 1
49
+ nPOTScale: 0
50
+ lightmap: 0
51
+ compressionQuality: 50
52
+ spriteMode: 1
53
+ spriteExtrude: 1
54
+ spriteMeshType: 1
55
+ alignment: 0
56
+ spritePivot: {x: 0.5, y: 0.5}
57
+ spritePixelsToUnits: 100
58
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
59
+ spriteGenerateFallbackPhysicsShape: 1
60
+ alphaUsage: 1
61
+ alphaIsTransparency: 1
62
+ spriteTessellationDetail: -1
63
+ textureType: 8
64
+ textureShape: 1
65
+ singleChannelComponent: 0
66
+ flipbookRows: 1
67
+ flipbookColumns: 1
68
+ maxTextureSizeSet: 0
69
+ compressionQualitySet: 0
70
+ textureFormatSet: 0
71
+ ignorePngGamma: 0
72
+ applyGammaDecoding: 0
73
+ swizzle: 50462976
74
+ cookieLightType: 0
75
+ platformSettings:
76
+ - serializedVersion: 4
77
+ buildTarget: DefaultTexturePlatform
78
+ maxTextureSize: 512
79
+ resizeAlgorithm: 0
80
+ textureFormat: -1
81
+ textureCompression: 1
82
+ compressionQuality: 50
83
+ crunchedCompression: 1
84
+ allowsAlphaSplitting: 0
85
+ overridden: 0
86
+ ignorePlatformSupport: 0
87
+ androidETC2FallbackOverride: 0
88
+ forceMaximumCompressionQuality_BC6H_BC7: 0
89
+ - serializedVersion: 4
90
+ buildTarget: Standalone
91
+ maxTextureSize: 2048
92
+ resizeAlgorithm: 0
93
+ textureFormat: -1
94
+ textureCompression: 1
95
+ compressionQuality: 50
96
+ crunchedCompression: 0
97
+ allowsAlphaSplitting: 0
98
+ overridden: 0
99
+ ignorePlatformSupport: 0
100
+ androidETC2FallbackOverride: 0
101
+ forceMaximumCompressionQuality_BC6H_BC7: 0
102
+ - serializedVersion: 4
103
+ buildTarget: Android
104
+ maxTextureSize: 2048
105
+ resizeAlgorithm: 0
106
+ textureFormat: -1
107
+ textureCompression: 1
108
+ compressionQuality: 50
109
+ crunchedCompression: 0
110
+ allowsAlphaSplitting: 0
111
+ overridden: 0
112
+ ignorePlatformSupport: 0
113
+ androidETC2FallbackOverride: 0
114
+ forceMaximumCompressionQuality_BC6H_BC7: 0
115
+ - serializedVersion: 4
116
+ buildTarget: WebGL
117
+ maxTextureSize: 2048
118
+ resizeAlgorithm: 0
119
+ textureFormat: -1
120
+ textureCompression: 1
121
+ compressionQuality: 50
122
+ crunchedCompression: 0
123
+ allowsAlphaSplitting: 0
124
+ overridden: 0
125
+ ignorePlatformSupport: 0
126
+ androidETC2FallbackOverride: 0
127
+ forceMaximumCompressionQuality_BC6H_BC7: 0
128
+ spriteSheet:
129
+ serializedVersion: 2
130
+ sprites:
131
+ - serializedVersion: 2
132
+ name: fi_14618378_0
133
+ rect:
134
+ serializedVersion: 2
135
+ x: 9
136
+ y: 0
137
+ width: 162
138
+ height: 261
139
+ alignment: 0
140
+ pivot: {x: 0, y: 0}
141
+ border: {x: 0, y: 0, z: 0, w: 0}
142
+ customData:
143
+ outline: []
144
+ physicsShape: []
145
+ tessellationDetail: -1
146
+ bones: []
147
+ spriteID: b740edcbd096bb040800000000000000
148
+ internalID: 4664437346796438651
149
+ vertices: []
150
+ indices:
151
+ edges: []
152
+ weights: []
153
+ - serializedVersion: 2
154
+ name: fi_14618378_1
155
+ rect:
156
+ serializedVersion: 2
157
+ x: 139
158
+ y: 109
159
+ width: 112
160
+ height: 102
161
+ alignment: 0
162
+ pivot: {x: 0, y: 0}
163
+ border: {x: 0, y: 0, z: 0, w: 0}
164
+ customData:
165
+ outline: []
166
+ physicsShape: []
167
+ tessellationDetail: -1
168
+ bones: []
169
+ spriteID: 16e952ebb86f3cd50800000000000000
170
+ internalID: 6756514946036899425
171
+ vertices: []
172
+ indices:
173
+ edges: []
174
+ weights: []
175
+ outline: []
176
+ customData:
177
+ physicsShape: []
178
+ bones: []
179
+ spriteID: 5e97eb03825dee720800000000000000
180
+ internalID: 0
181
+ vertices: []
182
+ indices:
183
+ edges: []
184
+ weights: []
185
+ secondaryTextures: []
186
+ spriteCustomMetadata:
187
+ entries: []
188
+ nameFileIdTable:
189
+ fi_14618378_0: 4664437346796438651
190
+ fi_14618378_1: 6756514946036899425
191
+ mipmapLimitGroupName:
192
+ pSDRemoveMatte: 0
193
+ userData:
194
+ assetBundleName:
195
+ assetBundleVariant: