app.hypergames.hypersdk 1.5.4 → 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,10 @@
|
|
|
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
|
+
|
|
1
8
|
## [1.5.4](https://github.com/mvmhyper/hyper-sdk/compare/v1.5.3...v1.5.4) (2026-02-24)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -25,12 +25,11 @@ namespace Hyper.Editor
|
|
|
25
25
|
// Core Settings
|
|
26
26
|
private HyperSDKSettings _settings;
|
|
27
27
|
private UnityEditor.Editor _settingsEditor;
|
|
28
|
-
private double _lastSettingsModificationTime;
|
|
29
28
|
|
|
30
29
|
// Game Content
|
|
31
30
|
private HyperGameContentConfig _contentConfig;
|
|
32
31
|
private UnityEditor.Editor _contentEditor;
|
|
33
|
-
|
|
32
|
+
|
|
34
33
|
|
|
35
34
|
#endregion
|
|
36
35
|
|
|
@@ -70,17 +69,10 @@ namespace Hyper.Editor
|
|
|
70
69
|
private void OnEnable()
|
|
71
70
|
{
|
|
72
71
|
LoadAllSettings();
|
|
73
|
-
UpdateModificationTimes();
|
|
74
|
-
|
|
75
|
-
// Subscribe to asset modification events
|
|
76
|
-
EditorApplication.projectChanged += OnProjectChanged;
|
|
77
72
|
}
|
|
78
73
|
|
|
79
74
|
private void OnDisable()
|
|
80
75
|
{
|
|
81
|
-
// Unsubscribe from events
|
|
82
|
-
EditorApplication.projectChanged -= OnProjectChanged;
|
|
83
|
-
|
|
84
76
|
// Clean up editors
|
|
85
77
|
if (_settingsEditor != null)
|
|
86
78
|
{
|
|
@@ -101,8 +93,7 @@ namespace Hyper.Editor
|
|
|
101
93
|
|
|
102
94
|
private void LoadAllSettings()
|
|
103
95
|
{
|
|
104
|
-
|
|
105
|
-
_settings = Resources.Load<HyperSDKSettings>(HyperConstants.SETTINGS_RESOURCE_PATH);
|
|
96
|
+
_settings = AssetDatabase.LoadAssetAtPath<HyperSDKSettings>(HyperConstants.SETTINGS_ASSET_PATH);
|
|
106
97
|
if (_settings != null)
|
|
107
98
|
{
|
|
108
99
|
// Destroy old editor if it exists
|
|
@@ -113,8 +104,7 @@ namespace Hyper.Editor
|
|
|
113
104
|
_settingsEditor = UnityEditor.Editor.CreateEditor(_settings);
|
|
114
105
|
}
|
|
115
106
|
|
|
116
|
-
|
|
117
|
-
_contentConfig = Resources.Load<HyperGameContentConfig>(HyperConstants.GAME_CONTENT_RESOURCE_PATH);
|
|
107
|
+
_contentConfig = AssetDatabase.LoadAssetAtPath<HyperGameContentConfig>(HyperConstants.GAME_CONTENT_ASSET_PATH);
|
|
118
108
|
if (_contentConfig != null)
|
|
119
109
|
{
|
|
120
110
|
// Destroy old editor if it exists
|
|
@@ -126,54 +116,6 @@ namespace Hyper.Editor
|
|
|
126
116
|
}
|
|
127
117
|
}
|
|
128
118
|
|
|
129
|
-
private void UpdateModificationTimes()
|
|
130
|
-
{
|
|
131
|
-
// Update modification times for both assets
|
|
132
|
-
if (System.IO.File.Exists(HyperConstants.SETTINGS_ASSET_PATH))
|
|
133
|
-
{
|
|
134
|
-
_lastSettingsModificationTime = System.IO.File.GetLastWriteTime(HyperConstants.SETTINGS_ASSET_PATH).ToFileTime();
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (System.IO.File.Exists(HyperConstants.GAME_CONTENT_ASSET_PATH))
|
|
138
|
-
{
|
|
139
|
-
_lastContentModificationTime = System.IO.File.GetLastWriteTime(HyperConstants.GAME_CONTENT_ASSET_PATH).ToFileTime();
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
private void OnProjectChanged()
|
|
144
|
-
{
|
|
145
|
-
// Check if our assets were modified externally
|
|
146
|
-
bool settingsChanged = false;
|
|
147
|
-
bool contentChanged = false;
|
|
148
|
-
|
|
149
|
-
if (System.IO.File.Exists(HyperConstants.SETTINGS_ASSET_PATH))
|
|
150
|
-
{
|
|
151
|
-
var currentTime = System.IO.File.GetLastWriteTime(HyperConstants.SETTINGS_ASSET_PATH).ToFileTime();
|
|
152
|
-
if (currentTime != _lastSettingsModificationTime)
|
|
153
|
-
{
|
|
154
|
-
settingsChanged = true;
|
|
155
|
-
_lastSettingsModificationTime = currentTime;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
if (System.IO.File.Exists(HyperConstants.GAME_CONTENT_ASSET_PATH))
|
|
160
|
-
{
|
|
161
|
-
var currentTime = System.IO.File.GetLastWriteTime(HyperConstants.GAME_CONTENT_ASSET_PATH).ToFileTime();
|
|
162
|
-
if (currentTime != _lastContentModificationTime)
|
|
163
|
-
{
|
|
164
|
-
contentChanged = true;
|
|
165
|
-
_lastContentModificationTime = currentTime;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Reload if changes detected
|
|
170
|
-
if (settingsChanged || contentChanged)
|
|
171
|
-
{
|
|
172
|
-
LoadAllSettings();
|
|
173
|
-
UpdateModificationTimes();
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
119
|
private void CreateSettingsAsset()
|
|
178
120
|
{
|
|
179
121
|
EnsureResourcesFolderExists();
|
|
@@ -289,7 +231,6 @@ namespace Hyper.Editor
|
|
|
289
231
|
{
|
|
290
232
|
EditorUtility.SetDirty(_settings);
|
|
291
233
|
AssetDatabase.SaveAssets();
|
|
292
|
-
UpdateModificationTimes();
|
|
293
234
|
}
|
|
294
235
|
}
|
|
295
236
|
|
|
@@ -326,7 +267,6 @@ namespace Hyper.Editor
|
|
|
326
267
|
{
|
|
327
268
|
EditorUtility.SetDirty(_contentConfig);
|
|
328
269
|
AssetDatabase.SaveAssets();
|
|
329
|
-
UpdateModificationTimes();
|
|
330
270
|
}
|
|
331
271
|
}
|
|
332
272
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app.hypergames.hypersdk",
|
|
3
|
-
"version": "1.5.
|
|
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",
|