app.hypergames.hypersdk 1.4.12 → 1.4.13

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.4.13](https://github.com/mvmhyper/hyper-sdk/compare/v1.4.12...v1.4.13) (2026-01-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Add HyperRandom usage check and scene menu utility ([4e8bad9](https://github.com/mvmhyper/hyper-sdk/commit/4e8bad9a56dc3007c1303ee095b8bfc6cb09903a))
7
+
1
8
  ## [1.4.12](https://github.com/mvmhyper/hyper-sdk/compare/v1.4.11...v1.4.12) (2025-12-23)
2
9
 
3
10
 
@@ -255,7 +255,7 @@ namespace Hyper.Editor
255
255
  {
256
256
  EditorGUILayout.BeginHorizontal();
257
257
  {
258
- if (GUILayout.Toggle(currentTab == TabType.WebGLSettings, "WebGL Settings", tallButtonStyleLeft))
258
+ if (GUILayout.Toggle(currentTab == TabType.WebGLSettings, "Configuration", tallButtonStyleLeft))
259
259
  {
260
260
  currentTab = TabType.WebGLSettings;
261
261
  }
@@ -289,7 +289,7 @@ namespace Hyper.Editor
289
289
 
290
290
  #endregion
291
291
 
292
- #region WebGL Settings Tab
292
+ #region Configuration Tab
293
293
 
294
294
  private static void DrawWebGLSettingsTab()
295
295
  {
@@ -593,6 +593,18 @@ namespace Hyper.Editor
593
593
  };
594
594
  CategorizeSettings(buildTargetSetting, optimalSettings, recommendedSettings, outstandingSettings);
595
595
 
596
+ var hyperRandomSetting = new SettingInfo
597
+ {
598
+ name = "HyperRandom Usage",
599
+ isOptimal = status.hyperRandomUsed,
600
+ current = $"• Current: {(status.hyperRandomUsed ? "HyperRandom detected in your code" : "HyperRandom not found")}",
601
+ recommended = "• Recommended: Use HyperRandom for deterministic gameplay",
602
+ description = "HyperRandom ensures deterministic gameplay across devices. Use the RNG Migrator tool (Hyper > RNG Migrator) to migrate UnityEngine.Random and System.Random to HyperRandom.",
603
+ priority = SettingPriority.Critical,
604
+ type = SettingType.HyperRandomUsage
605
+ };
606
+ CategorizeSettings(hyperRandomSetting, optimalSettings, recommendedSettings, outstandingSettings);
607
+
596
608
  // Note: Texture compression is platform-specific (Android/iOS) and not applicable to WebGL builds
597
609
  // WebGL handles texture compression at runtime via browser support
598
610
  // This setting is kept for reference but won't affect WebGL builds
@@ -746,6 +758,15 @@ namespace Hyper.Editor
746
758
  };
747
759
  CategorizeSettings(buildTargetSetting, optimal, recommended, outstanding);
748
760
 
761
+ var hyperRandomSetting = new SettingInfo
762
+ {
763
+ name = "HyperRandom Usage",
764
+ isOptimal = status.hyperRandomUsed,
765
+ priority = SettingPriority.Critical,
766
+ type = SettingType.HyperRandomUsage
767
+ };
768
+ CategorizeSettings(hyperRandomSetting, optimal, recommended, outstanding);
769
+
749
770
  // Note: Texture compression is platform-specific and not applicable to WebGL builds
750
771
  }
751
772
 
@@ -1085,6 +1106,12 @@ namespace Hyper.Editor
1085
1106
  // WebGL handles texture compression at runtime via browser support
1086
1107
  HyperDebug.LogWarning("Texture compression settings are not applicable to WebGL builds. WebGL handles texture compression automatically at runtime based on browser support.");
1087
1108
  break;
1109
+
1110
+ case SettingType.HyperRandomUsage:
1111
+ // Open the RNG Migrator tool to help developers migrate their Random usage
1112
+ HyperRandomMigrationTool.ShowMigrationTool();
1113
+ if (IsSDKDeveloper()) HyperDebug.Log("Opened RNG Migrator tool");
1114
+ break;
1088
1115
  }
1089
1116
 
1090
1117
  RepaintWindow();
@@ -2545,7 +2572,8 @@ namespace Hyper.Editor
2545
2572
  ShowSplashScreen,
2546
2573
  ColorSpace,
2547
2574
  TextureCompression,
2548
- BuildTargetPlatform
2575
+ BuildTargetPlatform,
2576
+ HyperRandomUsage
2549
2577
  }
2550
2578
 
2551
2579
  private class SettingInfo
@@ -2581,8 +2609,9 @@ namespace Hyper.Editor
2581
2609
  public TextureImporterFormat textureCompression;
2582
2610
  public bool showSplashScreen;
2583
2611
  public BuildTarget buildTarget;
2612
+ public bool hyperRandomUsed;
2584
2613
 
2585
- public int GetTotalSettings() => 17;
2614
+ public int GetTotalSettings() => 18;
2586
2615
 
2587
2616
  public int GetConfiguredSettings()
2588
2617
  {
@@ -2606,6 +2635,7 @@ namespace Hyper.Editor
2606
2635
  if (hyperLoaderAtIndex0) count++;
2607
2636
  if (colorSpace == ColorSpace.Gamma) count++;
2608
2637
  if (buildTarget == BuildTarget.WebGL) count++;
2638
+ if (hyperRandomUsed) count++;
2609
2639
 
2610
2640
  return count;
2611
2641
  }
@@ -2766,6 +2796,9 @@ namespace Hyper.Editor
2766
2796
  // Get active build target
2767
2797
  BuildTarget activeBuildTarget = EditorUserBuildSettings.activeBuildTarget;
2768
2798
 
2799
+ // Scan for HyperRandom usage in Assets folder (excluding HyperSDK)
2800
+ bool hyperRandomUsed = ScanForHyperRandomUsage();
2801
+
2769
2802
  return new WebGLSettingsStatus
2770
2803
  {
2771
2804
  compressionFormat = PlayerSettings.WebGL.compressionFormat,
@@ -2787,10 +2820,55 @@ namespace Hyper.Editor
2787
2820
  showSplashScreen = PlayerSettings.SplashScreen.show,
2788
2821
  colorSpace = currentColorSpace,
2789
2822
  textureCompression = defaultTexFormat,
2790
- buildTarget = activeBuildTarget
2823
+ buildTarget = activeBuildTarget,
2824
+ hyperRandomUsed = hyperRandomUsed
2791
2825
  };
2792
2826
  }
2793
2827
 
2828
+ /// <summary>
2829
+ /// Scans Assets folder for HyperRandom usage, excluding HyperSDK folder.
2830
+ /// Returns true if HyperRandom is used at least once in developer's code.
2831
+ /// </summary>
2832
+ private static bool ScanForHyperRandomUsage()
2833
+ {
2834
+ try
2835
+ {
2836
+ string assetsPath = Application.dataPath;
2837
+ if (!System.IO.Directory.Exists(assetsPath))
2838
+ return false;
2839
+
2840
+ string[] csFiles = System.IO.Directory.GetFiles(assetsPath, "*.cs", System.IO.SearchOption.AllDirectories);
2841
+
2842
+ foreach (string filePath in csFiles)
2843
+ {
2844
+ // Exclude HyperSDK folder
2845
+ string normalizedPath = filePath.Replace("\\", "/");
2846
+ if (normalizedPath.Contains("/HyperSDK/") || normalizedPath.Contains("Assets/HyperSDK"))
2847
+ continue;
2848
+
2849
+ // Exclude TextMesh Pro
2850
+ if (normalizedPath.Contains("/TextMesh Pro/") || normalizedPath.Contains("Assets/TextMesh Pro"))
2851
+ continue;
2852
+
2853
+ // Quick read to check for HyperRandom usage
2854
+ string content = System.IO.File.ReadAllText(filePath);
2855
+
2856
+ // Check for HyperRandom usage patterns
2857
+ if (System.Text.RegularExpressions.Regex.IsMatch(content, @"\bHyperRandom\b", System.Text.RegularExpressions.RegexOptions.IgnoreCase))
2858
+ {
2859
+ return true;
2860
+ }
2861
+ }
2862
+ }
2863
+ catch (System.Exception ex)
2864
+ {
2865
+ // If scan fails, default to false (will show as needing attention)
2866
+ if (IsSDKDeveloper()) HyperDebug.LogWarning($"HyperRandom scan failed: {ex.Message}");
2867
+ }
2868
+
2869
+ return false;
2870
+ }
2871
+
2794
2872
  #endregion
2795
2873
 
2796
2874
  #region Build Asset Analysis
@@ -0,0 +1,44 @@
1
+ #if UNITY_EDITOR
2
+ using UnityEditor;
3
+ using UnityEditor.SceneManagement;
4
+ using UnityEngine;
5
+
6
+ namespace Hyper.Editor
7
+ {
8
+ /// <summary>
9
+ /// Menu items for opening HyperSDK scenes.
10
+ /// </summary>
11
+ static class HyperSceneMenu
12
+ {
13
+ private const string HYPERLOADER_SCENE_PATH = "Assets/HyperSDK/HyperLoader.unity";
14
+ private const string MENU_PATH = "Hyper/Open HyperLoader Scene";
15
+
16
+ [MenuItem(MENU_PATH, priority = 200)]
17
+ private static void OpenHyperLoaderScene()
18
+ {
19
+ var sceneAsset = AssetDatabase.LoadAssetAtPath<SceneAsset>(HYPERLOADER_SCENE_PATH);
20
+ if (sceneAsset == null)
21
+ {
22
+ EditorUtility.DisplayDialog(
23
+ "Scene Not Found",
24
+ $"HyperLoader scene not found at:\n{HYPERLOADER_SCENE_PATH}\n\nPlease ensure the scene exists in the project.",
25
+ "OK"
26
+ );
27
+ return;
28
+ }
29
+
30
+ if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
31
+ {
32
+ EditorSceneManager.OpenScene(HYPERLOADER_SCENE_PATH);
33
+ }
34
+ }
35
+
36
+ [MenuItem(MENU_PATH, validate = true)]
37
+ private static bool ValidateOpenHyperLoaderScene()
38
+ {
39
+ return !EditorApplication.isPlaying;
40
+ }
41
+ }
42
+ }
43
+ #endif
44
+
@@ -0,0 +1,2 @@
1
+ fileFormatVersion: 2
2
+ guid: 781094a40eb9a2d439ddee78020e5d9f
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.112, y: -280.1698}
307
+ m_AnchoredPosition: {x: 489.1766, 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: 489.112, y: -133.2274}
1095
+ m_AnchoredPosition: {x: 489.1766, 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
@@ -117,7 +117,7 @@ MonoBehaviour:
117
117
  m_Top: 0
118
118
  m_Bottom: 20
119
119
  m_ChildAlignment: 4
120
- m_Spacing: 10
120
+ m_Spacing: 20
121
121
  m_ChildForceExpandWidth: 0
122
122
  m_ChildForceExpandHeight: 0
123
123
  m_ChildControlWidth: 0
@@ -166,8 +166,8 @@ RectTransform:
166
166
  m_GameObject: {fileID: 2742868627260701116}
167
167
  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
168
168
  m_LocalPosition: {x: 0, y: 0, z: 0}
169
- m_LocalScale: {x: 1, y: 1, z: 1}
170
- m_ConstrainProportionsScale: 0
169
+ m_LocalScale: {x: 1.2, y: 1.2, z: 1.2}
170
+ m_ConstrainProportionsScale: 1
171
171
  m_Children: []
172
172
  m_Father: {fileID: 919274274380233852}
173
173
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -325,8 +325,8 @@ RectTransform:
325
325
  m_LocalEulerAnglesHint: {x: 0, y: -0, z: -0}
326
326
  m_AnchorMin: {x: 0, y: 1}
327
327
  m_AnchorMax: {x: 0, y: 1}
328
- m_AnchoredPosition: {x: 199.7, y: -10.5}
329
- m_SizeDelta: {x: 276.4, y: 0}
328
+ m_AnchoredPosition: {x: 201.8, y: -10.5}
329
+ m_SizeDelta: {x: 264.55, y: 0}
330
330
  m_Pivot: {x: 0.5, y: 0.5}
331
331
  --- !u!222 &8979309464556769080
332
332
  CanvasRenderer:
@@ -383,12 +383,12 @@ MonoBehaviour:
383
383
  m_faceColor:
384
384
  serializedVersion: 2
385
385
  rgba: 4294967295
386
- m_fontSize: 35
386
+ m_fontSize: 33.5
387
387
  m_fontSizeBase: 32.5
388
388
  m_fontWeight: 400
389
389
  m_enableAutoSizing: 1
390
390
  m_fontSizeMin: 18
391
- m_fontSizeMax: 35
391
+ m_fontSizeMax: 33.5
392
392
  m_fontStyle: 32
393
393
  m_HorizontalAlignment: 1
394
394
  m_VerticalAlignment: 256
@@ -610,8 +610,8 @@ MonoBehaviour:
610
610
  m_faceColor:
611
611
  serializedVersion: 2
612
612
  rgba: 4294967295
613
- m_fontSize: 28
614
- m_fontSizeBase: 28
613
+ m_fontSize: 32
614
+ m_fontSizeBase: 32
615
615
  m_fontWeight: 400
616
616
  m_enableAutoSizing: 0
617
617
  m_fontSizeMin: 18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app.hypergames.hypersdk",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
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",