app.hypergames.hypersdk 1.5.3 → 1.5.5

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,18 @@
1
+ ## [1.5.5](https://github.com/mvmhyper/hyper-sdk/compare/v1.5.4...v1.5.5) (2026-02-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * UPM - ensure Settings window and asset file stay in sync ([f8da040](https://github.com/mvmhyper/hyper-sdk/commit/f8da040b84f6f797f433f2c689f3a5f687009bdf))
7
+
8
+ ## [1.5.4](https://github.com/mvmhyper/hyper-sdk/compare/v1.5.3...v1.5.4) (2026-02-24)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * correct landscape safe area handling and control bar alignment in SDK UI ([83c4c1e](https://github.com/mvmhyper/hyper-sdk/commit/83c4c1e82fc14d296d5eb6cd916beafe8726bea3))
14
+ * Ensure Settings window and asset file stay in sync ([a9c7a43](https://github.com/mvmhyper/hyper-sdk/commit/a9c7a43927404573148467702791a9c3eb38dae0))
15
+
1
16
  ## [1.5.3](https://github.com/mvmhyper/hyper-sdk/compare/v1.5.2...v1.5.3) (2026-02-10)
2
17
 
3
18
 
@@ -183,10 +183,11 @@ namespace Hyper.Editor
183
183
 
184
184
  serializedObject.ApplyModifiedProperties();
185
185
 
186
- // Mark object as dirty if any changes were made
186
+ // Mark object as dirty and save immediately if any changes were made
187
187
  if (GUI.changed)
188
188
  {
189
189
  EditorUtility.SetDirty(settings);
190
+ AssetDatabase.SaveAssets();
190
191
  }
191
192
  }
192
193
 
@@ -30,6 +30,7 @@ namespace Hyper.Editor
30
30
  private HyperGameContentConfig _contentConfig;
31
31
  private UnityEditor.Editor _contentEditor;
32
32
 
33
+
33
34
  #endregion
34
35
 
35
36
  #region Window Configuration
@@ -92,17 +93,25 @@ namespace Hyper.Editor
92
93
 
93
94
  private void LoadAllSettings()
94
95
  {
95
- // Load Core Settings
96
- _settings = Resources.Load<HyperSDKSettings>(HyperConstants.SETTINGS_RESOURCE_PATH);
96
+ _settings = AssetDatabase.LoadAssetAtPath<HyperSDKSettings>(HyperConstants.SETTINGS_ASSET_PATH);
97
97
  if (_settings != null)
98
98
  {
99
+ // Destroy old editor if it exists
100
+ if (_settingsEditor != null)
101
+ {
102
+ DestroyImmediate(_settingsEditor);
103
+ }
99
104
  _settingsEditor = UnityEditor.Editor.CreateEditor(_settings);
100
105
  }
101
106
 
102
- // Load Game Content
103
- _contentConfig = Resources.Load<HyperGameContentConfig>(HyperConstants.GAME_CONTENT_RESOURCE_PATH);
107
+ _contentConfig = AssetDatabase.LoadAssetAtPath<HyperGameContentConfig>(HyperConstants.GAME_CONTENT_ASSET_PATH);
104
108
  if (_contentConfig != null)
105
109
  {
110
+ // Destroy old editor if it exists
111
+ if (_contentEditor != null)
112
+ {
113
+ DestroyImmediate(_contentEditor);
114
+ }
106
115
  _contentEditor = UnityEditor.Editor.CreateEditor(_contentConfig);
107
116
  }
108
117
  }
@@ -214,7 +223,15 @@ namespace Hyper.Editor
214
223
 
215
224
  if (_settingsEditor != null)
216
225
  {
226
+ EditorGUI.BeginChangeCheck();
217
227
  _settingsEditor.OnInspectorGUI();
228
+
229
+ // Save immediately if changes were made
230
+ if (EditorGUI.EndChangeCheck())
231
+ {
232
+ EditorUtility.SetDirty(_settings);
233
+ AssetDatabase.SaveAssets();
234
+ }
218
235
  }
219
236
 
220
237
  EditorGUILayout.EndScrollView();
@@ -242,7 +259,15 @@ namespace Hyper.Editor
242
259
 
243
260
  if (_contentEditor != null)
244
261
  {
262
+ EditorGUI.BeginChangeCheck();
245
263
  _contentEditor.OnInspectorGUI();
264
+
265
+ // Save immediately if changes were made
266
+ if (EditorGUI.EndChangeCheck())
267
+ {
268
+ EditorUtility.SetDirty(_contentConfig);
269
+ AssetDatabase.SaveAssets();
270
+ }
246
271
  }
247
272
 
248
273
  EditorGUILayout.EndScrollView();
package/HyperLoader.unity CHANGED
@@ -304,7 +304,7 @@ RectTransform:
304
304
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
305
305
  m_AnchorMin: {x: 0, y: 1}
306
306
  m_AnchorMax: {x: 0, y: 1}
307
- m_AnchoredPosition: {x: 489.2762, y: -280.1698}
307
+ m_AnchoredPosition: {x: 1059.0492, y: -280.1698}
308
308
  m_SizeDelta: {x: 1044.9, y: 239.347}
309
309
  m_Pivot: {x: 0.5, y: 0.5}
310
310
  --- !u!114 &751153944
@@ -840,7 +840,7 @@ GameObject:
840
840
  m_Component:
841
841
  - component: {fileID: 1064166296}
842
842
  m_Layer: 0
843
- m_Name: __HyperSDK_BuildMarker_639052456961623634
843
+ m_Name: __HyperSDK_BuildMarker_639075716235347695
844
844
  m_TagString: Untagged
845
845
  m_Icon: {fileID: 0}
846
846
  m_NavMeshLayer: 0
@@ -1092,7 +1092,7 @@ RectTransform:
1092
1092
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
1093
1093
  m_AnchorMin: {x: 0, y: 1}
1094
1094
  m_AnchorMax: {x: 0, y: 1}
1095
- m_AnchoredPosition: {x: 489.2762, y: -133.2274}
1095
+ m_AnchoredPosition: {x: 1059.0492, y: -133.2274}
1096
1096
  m_SizeDelta: {x: 875, y: 54.5378}
1097
1097
  m_Pivot: {x: 0.5, y: 0.5}
1098
1098
  --- !u!1 &2874543288936963705
@@ -829,13 +829,13 @@ namespace Hyper.Internal.Managers
829
829
  {
830
830
  HideGameOverModal();
831
831
  HidePauseModals();
832
-
832
+
833
833
  // Reset game state flags
834
834
  _hasGameStarted = false;
835
835
  _hasGameEnded = false;
836
836
  _isPaused = false;
837
837
  _isFrozenBeforePause = false;
838
-
838
+
839
839
  HyperRuntime.Timer.Reset();
840
840
  HyperRuntime.DataManager.UpdateScore(0);
841
841
 
@@ -1112,7 +1112,12 @@ namespace Hyper.Internal.Managers
1112
1112
 
1113
1113
  GameObject prefab = Resources.Load<GameObject>("UIPrefabs/ControlBar");
1114
1114
  GameObject instance = Instantiate(prefab);
1115
- instance.transform.SetParent(_safeArea.transform, false);
1115
+
1116
+ Transform controlBarParent = _isPortrait ? _safeArea.transform : _canvas.transform;
1117
+
1118
+ instance.transform.SetParent(controlBarParent, false);
1119
+
1120
+ if (!_isPortrait) instance.transform.SetAsFirstSibling();
1116
1121
 
1117
1122
  RectTransform rectTransform = instance.GetComponent<RectTransform>();
1118
1123
  if (rectTransform != null)
@@ -55,7 +55,7 @@ namespace Hyper.Internal
55
55
 
56
56
  Rect MapSafeAreaToRect(SafeAreaInsets safeAreaInsets)
57
57
  {
58
- //? Adding top padding to safe area
58
+
59
59
 
60
60
  if (_gameManager.ControlBarLayout == ControlBarLayout.Default)
61
61
  {
@@ -70,6 +70,22 @@ namespace Hyper.Internal
70
70
  safeAreaInsets.top += topPadding;
71
71
  safeAreaInsets.bottom = 0f;
72
72
 
73
+ if (_gameManager != null && !_gameManager.IsPortrait())
74
+ {
75
+ //? Hyper Mobile currently supports a forced left-landscape mode.
76
+ //? This is to avoid the notch/cutout in the landscape mode.
77
+ bool shouldMapTopToLeft =
78
+ safeAreaInsets.top > 0f &&
79
+ safeAreaInsets.left <= 0f &&
80
+ safeAreaInsets.right <= 0f;
81
+
82
+ if (shouldMapTopToLeft)
83
+ {
84
+ safeAreaInsets.left = safeAreaInsets.top;
85
+ safeAreaInsets.top = 0f;
86
+ }
87
+ }
88
+
73
89
  float screenWidth = Screen.width;
74
90
  float screenHeight = Screen.height;
75
91
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app.hypergames.hypersdk",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
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",