app.hypergames.hypersdk 1.5.5 → 1.5.7

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.5.7](https://github.com/mvmhyper/hyper-sdk/compare/v1.5.6...v1.5.7) (2026-03-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Input System assembly reference in Hyper.Internal.asmdef ([1a87e95](https://github.com/mvmhyper/hyper-sdk/commit/1a87e959884256b325618f0663958af6bdb0823a))
7
+
8
+ ## [1.5.6](https://github.com/mvmhyper/hyper-sdk/compare/v1.5.5...v1.5.6) (2026-02-26)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * Runtime resource loading prioritizes configured Assets copy over package template ([ec8d523](https://github.com/mvmhyper/hyper-sdk/commit/ec8d523ae9110d854e00572f2de5471721d63b45))
14
+
1
15
  ## [1.5.5](https://github.com/mvmhyper/hyper-sdk/compare/v1.5.4...v1.5.5) (2026-02-26)
2
16
 
3
17
 
@@ -19,7 +19,8 @@ namespace Hyper.Editor
19
19
  private static bool TryLoadSettings(out HyperSDKSettings s)
20
20
  {
21
21
  if (_settings == null)
22
- _settings = Resources.Load<HyperSDKSettings>(HyperConstants.SETTINGS_RESOURCE_PATH);
22
+ // Always load from Assets folder, not package (ensures we edit the editable copy)
23
+ _settings = AssetDatabase.LoadAssetAtPath<HyperSDKSettings>(HyperConstants.SETTINGS_ASSET_PATH);
23
24
  s = _settings;
24
25
  return s != null;
25
26
  }
@@ -55,7 +55,8 @@ namespace Hyper.Editor
55
55
 
56
56
  private void LoadSettings()
57
57
  {
58
- _settings = Resources.Load<HyperSDKSettings>(HyperConstants.SETTINGS_RESOURCE_PATH);
58
+ // Always load from Assets folder, not package (ensures we edit the editable copy)
59
+ _settings = AssetDatabase.LoadAssetAtPath<HyperSDKSettings>(HyperConstants.SETTINGS_ASSET_PATH);
59
60
 
60
61
  if (_settings != null)
61
62
  {
@@ -63,7 +64,7 @@ namespace Hyper.Editor
63
64
  }
64
65
  else
65
66
  {
66
- HyperDebug.LogWarning("Core settings not found in Resources folder");
67
+ HyperDebug.LogWarning("Core settings not found in Assets folder");
67
68
  }
68
69
  }
69
70
 
@@ -53,7 +53,8 @@ namespace Hyper.Editor
53
53
 
54
54
  private void LoadSettings()
55
55
  {
56
- _contentConfig = Resources.Load<HyperGameContentConfig>(HyperConstants.GAME_CONTENT_RESOURCE_PATH);
56
+ // Always load from Assets folder, not package (ensures we edit the editable copy)
57
+ _contentConfig = AssetDatabase.LoadAssetAtPath<HyperGameContentConfig>(HyperConstants.GAME_CONTENT_ASSET_PATH);
57
58
 
58
59
  if (_contentConfig != null)
59
60
  {
@@ -61,7 +62,7 @@ namespace Hyper.Editor
61
62
  }
62
63
  else
63
64
  {
64
- HyperDebug.LogWarning("Game content config not found in Resources folder");
65
+ HyperDebug.LogWarning("Game content config not found in Assets folder");
65
66
  }
66
67
  }
67
68
 
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: 1059.0492, y: -280.1698}
307
+ m_AnchoredPosition: {x: 489.28683, 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
@@ -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: 1059.0492, y: -133.2274}
1095
+ m_AnchoredPosition: {x: 489.28683, 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
@@ -92,7 +92,8 @@ namespace Hyper.Internal
92
92
 
93
93
  private void LoadConfiguration()
94
94
  {
95
- _gameContentConfig = Resources.Load<HyperGameContentConfig>("HyperGameContentConfig");
95
+ // Load game content - prioritize Assets folder over package Resources
96
+ _gameContentConfig = LoadResourceFromAssets<HyperGameContentConfig>("HyperGameContentConfig");
96
97
  if (_gameContentConfig == null)
97
98
  {
98
99
  HyperDebug.LogError("HyperGameContentConfig.asset not found in resources");
@@ -103,6 +104,54 @@ namespace Hyper.Internal
103
104
  _hintWaitInstruction = new WaitForSecondsRealtime(_gameContentConfig.HintSwitchTimeInSeconds);
104
105
  }
105
106
 
107
+ /// <summary>
108
+ /// Loads a resource from Resources, prioritizing Assets folder over package Resources.
109
+ /// Uses Resources.LoadAll to find all instances, then selects the configured one (non-empty) if multiple exist.
110
+ /// </summary>
111
+ private static T LoadResourceFromAssets<T>(string resourceName) where T : UnityEngine.Object
112
+ {
113
+ T[] allResources = Resources.LoadAll<T>(string.Empty);
114
+
115
+ if (allResources == null || allResources.Length == 0)
116
+ {
117
+ return Resources.Load<T>(resourceName);
118
+ }
119
+
120
+ System.Collections.Generic.List<T> matchingResources = new System.Collections.Generic.List<T>();
121
+ foreach (T resource in allResources)
122
+ {
123
+ if (resource != null && resource.name == resourceName)
124
+ {
125
+ matchingResources.Add(resource);
126
+ }
127
+ }
128
+
129
+ if (matchingResources.Count == 0)
130
+ {
131
+ return Resources.Load<T>(resourceName);
132
+ }
133
+
134
+ if (matchingResources.Count == 1)
135
+ {
136
+ return matchingResources[0];
137
+ }
138
+
139
+ if (typeof(T) == typeof(HyperGameContentConfig))
140
+ {
141
+ for (int i = 0; i < matchingResources.Count; i++)
142
+ {
143
+ var config = matchingResources[i] as HyperGameContentConfig;
144
+ if (config != null && config.GameScene != null && config.GameScene.IsValid)
145
+ {
146
+ return matchingResources[i];
147
+ }
148
+ }
149
+ return matchingResources.Count > 1 ? matchingResources[1] : matchingResources[0];
150
+ }
151
+
152
+ return matchingResources.Count > 1 ? matchingResources[1] : matchingResources[0];
153
+ }
154
+
106
155
  #endregion
107
156
 
108
157
  #region Splash Screen Setup
@@ -176,19 +176,69 @@ namespace Hyper.Internal
176
176
 
177
177
  private static void LoadSettings()
178
178
  {
179
- _settings = Resources.Load<HyperSDKSettings>("HyperSDKSettings");
179
+ // Load settings - prioritize Assets folder over package Resources
180
+ _settings = LoadResourceFromAssets<HyperSDKSettings>("HyperSDKSettings");
180
181
  if (_settings == null)
181
182
  {
182
183
  HyperDebug.LogError("Failed to load HyperSDKSettings");
183
184
  }
184
185
 
185
- _gameContent = Resources.Load<HyperGameContentConfig>("HyperGameContentConfig");
186
+ // Load game content - prioritize Assets folder over package Resources
187
+ _gameContent = LoadResourceFromAssets<HyperGameContentConfig>("HyperGameContentConfig");
186
188
  if (_gameContent == null)
187
189
  {
188
190
  HyperDebug.LogError("Failed to load HyperGameContentConfig");
189
191
  }
190
192
  }
191
193
 
194
+ /// <summary>
195
+ /// Loads a resource from Resources, prioritizing Assets folder over package Resources.
196
+ /// Uses Resources.LoadAll to find all instances, then selects the configured one (non-empty) if multiple exist.
197
+ /// </summary>
198
+ private static T LoadResourceFromAssets<T>(string resourceName) where T : UnityEngine.Object
199
+ {
200
+ T[] allResources = Resources.LoadAll<T>(string.Empty);
201
+
202
+ if (allResources == null || allResources.Length == 0)
203
+ {
204
+ return Resources.Load<T>(resourceName);
205
+ }
206
+
207
+ System.Collections.Generic.List<T> matchingResources = new System.Collections.Generic.List<T>();
208
+ foreach (T resource in allResources)
209
+ {
210
+ if (resource != null && resource.name == resourceName)
211
+ {
212
+ matchingResources.Add(resource);
213
+ }
214
+ }
215
+
216
+ if (matchingResources.Count == 0)
217
+ {
218
+ return Resources.Load<T>(resourceName);
219
+ }
220
+
221
+ if (matchingResources.Count == 1)
222
+ {
223
+ return matchingResources[0];
224
+ }
225
+
226
+ if (typeof(T) == typeof(HyperGameContentConfig))
227
+ {
228
+ for (int i = 0; i < matchingResources.Count; i++)
229
+ {
230
+ var config = matchingResources[i] as HyperGameContentConfig;
231
+ if (config != null && config.GameScene != null && config.GameScene.IsValid)
232
+ {
233
+ return matchingResources[i];
234
+ }
235
+ }
236
+ return matchingResources.Count > 1 ? matchingResources[1] : matchingResources[0];
237
+ }
238
+
239
+ return matchingResources.Count > 1 ? matchingResources[1] : matchingResources[0];
240
+ }
241
+
192
242
  private static void InitializeModules()
193
243
  {
194
244
  _eventManager = _singletonObject.AddComponent<EventManager>();
@@ -6,7 +6,8 @@
6
6
  "GUID:caca889fed6088d40b22c2d7e2909c31",
7
7
  "GUID:40ef3cd4de5c29f4eb9f3ee497e60aed",
8
8
  "GUID:a701715b74d53214c9a994c9a64f14b6",
9
- "GUID:36e0cae4e139e0a4d869114979dcc37d"
9
+ "GUID:36e0cae4e139e0a4d869114979dcc37d",
10
+ "Unity.InputSystem"
10
11
  ],
11
12
  "includePlatforms": [],
12
13
  "excludePlatforms": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app.hypergames.hypersdk",
3
- "version": "1.5.5",
3
+ "version": "1.5.7",
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",