app.hypergames.hypersdk 1.1.10 → 1.1.11

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.1.11](https://github.com/mvmhyper/hyper-sdk/compare/v1.1.10...v1.1.11) (2025-11-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * installer now overwrites existing sdk files and prevents multiple calls ([3afc97c](https://github.com/mvmhyper/hyper-sdk/commit/3afc97c1dba0ae841542f0ce4da895385ed51217))
7
+
1
8
  ## [1.1.10](https://github.com/mvmhyper/hyper-sdk/compare/v1.1.9...v1.1.10) (2025-11-26)
2
9
 
3
10
 
@@ -21,14 +21,26 @@ namespace Hyper.Editor
21
21
  private const string HyperGameContentConfigDestination = "Assets/HyperSDK/Runtime/Resources/HyperGameContentConfig.asset";
22
22
  private const string HyperSDKSettingsDestination = "Assets/HyperSDK/Runtime/Resources/HyperSDKSettings.asset";
23
23
 
24
+ private static bool _hasChecked = false;
24
25
 
25
26
  static HyperSDKInstaller()
26
27
  {
27
- EditorApplication.delayCall += EnsureSetupAssets;
28
+ // Only register delayCall once per domain reload
29
+ if (!_hasChecked)
30
+ {
31
+ EditorApplication.delayCall += EnsureSetupAssets;
32
+ _hasChecked = true;
33
+ }
28
34
  }
29
35
 
30
36
  private static void EnsureSetupAssets()
31
37
  {
38
+ // Skip if already running or during play mode
39
+ if (EditorApplication.isPlaying || EditorApplication.isCompiling)
40
+ {
41
+ return;
42
+ }
43
+
32
44
  var packageInfo = UnityEditor.PackageManager.PackageInfo.FindForAssembly(typeof(HyperSDKInstaller).Assembly);
33
45
  if (packageInfo == null || string.IsNullOrEmpty(packageInfo.resolvedPath))
34
46
  {
@@ -49,6 +61,7 @@ namespace Hyper.Editor
49
61
  var configExists = File.Exists(HyperGameContentConfigDestination);
50
62
  var settingsExists = File.Exists(HyperSDKSettingsDestination);
51
63
 
64
+ // Only run if version changed or files are missing
52
65
  if (previousVersion == packageInfo.version &&
53
66
  sceneExists &&
54
67
  templateExists &&
@@ -86,6 +99,12 @@ namespace Hyper.Editor
86
99
  Directory.CreateDirectory(destinationDir);
87
100
  }
88
101
 
102
+ // Delete existing file if it exists to allow overwriting
103
+ if (File.Exists(destinationPath))
104
+ {
105
+ FileUtil.DeleteFileOrDirectory(destinationPath);
106
+ }
107
+
89
108
  FileUtil.CopyFileOrDirectory(sourcePath, destinationPath);
90
109
  }
91
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app.hypergames.hypersdk",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "displayName": "HyperSDK",
5
5
  "description": "Official Unity SDK for HyperGames. Brings platform APIs, multiplayer battle flow, score and tutorial systems, and WebGL build tooling straight into your project.",
6
6
  "unity": "6000.0",