app.hypergames.hypersdk 1.5.1 → 1.5.2

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.2](https://github.com/mvmhyper/hyper-sdk/compare/v1.5.1...v1.5.2) (2026-02-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Prevent premature input during scene transitions in StartingInstructionModal ([67a1180](https://github.com/mvmhyper/hyper-sdk/commit/67a1180de801aae0d44f8b8a5c81c9bde1e5e3e1))
7
+
1
8
  ## [1.5.1](https://github.com/mvmhyper/hyper-sdk/compare/v1.5.0...v1.5.1) (2026-02-04)
2
9
 
3
10
 
package/HyperLoader.unity CHANGED
@@ -305,7 +305,7 @@ RectTransform:
305
305
  m_AnchorMin: {x: 0, y: 1}
306
306
  m_AnchorMax: {x: 0, y: 1}
307
307
  m_AnchoredPosition: {x: 489.2762, y: -280.1698}
308
- m_SizeDelta: {x: 0, y: 239.347}
308
+ m_SizeDelta: {x: 1044.9, y: 239.347}
309
309
  m_Pivot: {x: 0.5, y: 0.5}
310
310
  --- !u!114 &751153944
311
311
  MonoBehaviour:
@@ -704,58 +704,10 @@ namespace Hyper.Internal.Managers
704
704
  private void AdjustSettingsBasedOnResolution()
705
705
  {
706
706
  #if !UNITY_EDITOR && UNITY_WEBGL
707
- int smallerDimension = Mathf.Min(Screen.width, Screen.height);
708
-
709
- if (smallerDimension <= 720)
710
- {
711
- SetLowPerformanceSettings();
712
- }
713
- else if (smallerDimension <= 1080)
714
- {
715
- SetMediumPerformanceSettings();
716
- }
717
- else
718
- {
719
- SetHighPerformanceSettings();
720
- }
721
-
722
707
  OptimizeForWebGL();
723
708
  #endif
724
709
  }
725
710
 
726
- private void SetLowPerformanceSettings()
727
- {
728
- QualitySettings.antiAliasing = 0;
729
- QualitySettings.shadows = ShadowQuality.Disable;
730
- QualitySettings.softParticles = false;
731
- QualitySettings.realtimeReflectionProbes = false;
732
- QualitySettings.pixelLightCount = 1;
733
- QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable;
734
- QualitySettings.vSyncCount = 0;
735
- }
736
-
737
- private void SetMediumPerformanceSettings()
738
- {
739
- QualitySettings.antiAliasing = 2;
740
- QualitySettings.shadows = ShadowQuality.HardOnly;
741
- QualitySettings.softParticles = true;
742
- QualitySettings.realtimeReflectionProbes = false;
743
- QualitySettings.pixelLightCount = 2;
744
- QualitySettings.anisotropicFiltering = AnisotropicFiltering.Enable;
745
- QualitySettings.vSyncCount = 1;
746
- }
747
-
748
- private void SetHighPerformanceSettings()
749
- {
750
- QualitySettings.antiAliasing = 4;
751
- QualitySettings.shadows = ShadowQuality.All;
752
- QualitySettings.softParticles = true;
753
- QualitySettings.realtimeReflectionProbes = true;
754
- QualitySettings.pixelLightCount = 4;
755
- QualitySettings.anisotropicFiltering = AnisotropicFiltering.ForceEnable;
756
- QualitySettings.vSyncCount = 1;
757
- }
758
-
759
711
  private void OptimizeForWebGL()
760
712
  {
761
713
  QualitySettings.streamingMipmapsActive = false;
@@ -769,19 +721,20 @@ namespace Hyper.Internal.Managers
769
721
 
770
722
  private void OnEnable()
771
723
  {
772
- SceneManager.sceneLoaded += OnSceneLoaded;
724
+ SceneManager.activeSceneChanged += OnSceneLoadedAndActivated;
773
725
  }
774
726
 
775
727
  private void OnDisable()
776
728
  {
777
- SceneManager.sceneLoaded -= OnSceneLoaded;
729
+ SceneManager.activeSceneChanged -= OnSceneLoadedAndActivated;
730
+
778
731
  if (HyperRuntime.EventManager != null)
779
732
  {
780
733
  HyperRuntime.EventManager.OnGameStart -= HandleGameStarted;
781
734
  }
782
735
  }
783
736
 
784
- private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
737
+ private void OnSceneLoadedAndActivated(Scene previousScene, Scene newScene)
785
738
  {
786
739
  Time.timeScale = 1;
787
740
  _previousTimeScale = 1f; // Sync tracking on scene load
@@ -792,8 +745,8 @@ namespace Hyper.Internal.Managers
792
745
 
793
746
  string transitionSceneName = HyperRuntime.GameContent.TransitionScene?.SceneName;
794
747
 
795
- if ((!string.IsNullOrEmpty(menuSceneName) && scene.name.Equals(menuSceneName, StringComparison.OrdinalIgnoreCase)) ||
796
- (!string.IsNullOrEmpty(transitionSceneName) && scene.name.Equals(transitionSceneName, StringComparison.OrdinalIgnoreCase)))
748
+ if ((!string.IsNullOrEmpty(menuSceneName) && newScene.name.Equals(menuSceneName, StringComparison.OrdinalIgnoreCase)) ||
749
+ (!string.IsNullOrEmpty(transitionSceneName) && newScene.name.Equals(transitionSceneName, StringComparison.OrdinalIgnoreCase)))
797
750
  {
798
751
  IsInGameScene = false;
799
752
  _hasGameStarted = false;
@@ -1,8 +1,10 @@
1
+ using System.Collections;
1
2
  using System.Runtime.InteropServices;
2
3
  using Hyper.Internal.Managers;
3
4
  using Hyper.Shared;
4
5
  using TMPro;
5
6
  using UnityEngine;
7
+ using UnityEngine.SceneManagement;
6
8
  using UnityEngine.UI;
7
9
 
8
10
  namespace Hyper.Internal
@@ -25,10 +27,10 @@ namespace Hyper.Internal
25
27
  private StartCTA _currentCTA;
26
28
  private SwipeDirection _swipeDirection;
27
29
 
28
- // Swipe detection variables
30
+ private bool _canAcceptInput = false;
29
31
  private Vector2 _swipeStartPosition;
30
32
  private bool _isTrackingSwipe;
31
- private const float SWIPE_THRESHOLD = 50f; // Minimum distance in pixels for a swipe
33
+ private const float SWIPE_THRESHOLD = 50f;
32
34
 
33
35
  void Awake()
34
36
  {
@@ -38,9 +40,26 @@ namespace Hyper.Internal
38
40
  _backendManager = HyperRuntime.BackendManager;
39
41
  }
40
42
 
43
+ void OnEnable()
44
+ {
45
+ _canAcceptInput = false;
46
+ StartCoroutine(EnableInputAfterDelay());
47
+ }
48
+
49
+ private IEnumerator EnableInputAfterDelay()
50
+ {
51
+ // Wait 5 frames to ensure scene transition is fully complete
52
+ yield return null;
53
+ yield return null;
54
+ yield return null;
55
+ yield return null;
56
+ yield return null;
57
+ _canAcceptInput = true;
58
+ }
59
+
41
60
  void Update()
42
61
  {
43
- if (!gameObject.activeSelf) return;
62
+ if (!gameObject.activeSelf || !_canAcceptInput) return;
44
63
 
45
64
  if (_currentCTA == StartCTA.TapToPlay)
46
65
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app.hypergames.hypersdk",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
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",