app.hypergames.hypersdk 1.5.0 → 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 +14 -0
- package/HyperLoader.unity +3 -3
- package/Runtime/Internal/Managers/GameManager.cs +6 -53
- package/Runtime/Internal/UI/Modals/StartingInstructionModal.cs +30 -6
- package/Runtime/Resources/Sprites/Start CTAs/Swipe Gesture.anim +15 -15
- package/Runtime/Resources/UIPrefabs/StartingInstructionModal.prefab +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
8
|
+
## [1.5.1](https://github.com/mvmhyper/hyper-sdk/compare/v1.5.0...v1.5.1) (2026-02-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* polish swipe Start CTA animation and hand orientation ([f56410c](https://github.com/mvmhyper/hyper-sdk/commit/f56410cdf19061f53b82c54c47bb8bdce22277cf))
|
|
14
|
+
|
|
1
15
|
# [1.5.0](https://github.com/mvmhyper/hyper-sdk/compare/v1.4.22...v1.5.0) (2026-02-04)
|
|
2
16
|
|
|
3
17
|
|
package/HyperLoader.unity
CHANGED
|
@@ -304,8 +304,8 @@ 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.
|
|
308
|
-
m_SizeDelta: {x:
|
|
307
|
+
m_AnchoredPosition: {x: 489.2762, y: -280.1698}
|
|
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:
|
|
@@ -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.
|
|
1095
|
+
m_AnchoredPosition: {x: 489.2762, 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
|
|
@@ -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.
|
|
724
|
+
SceneManager.activeSceneChanged += OnSceneLoadedAndActivated;
|
|
773
725
|
}
|
|
774
726
|
|
|
775
727
|
private void OnDisable()
|
|
776
728
|
{
|
|
777
|
-
SceneManager.
|
|
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
|
|
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) &&
|
|
796
|
-
(!string.IsNullOrEmpty(transitionSceneName) &&
|
|
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
|
|
@@ -17,6 +19,7 @@ namespace Hyper.Internal
|
|
|
17
19
|
[SerializeField] private TextMeshProUGUI startCtaLabel;
|
|
18
20
|
[SerializeField] private BlinkingText blinkingText;
|
|
19
21
|
[SerializeField] private RectTransform swipeGif;
|
|
22
|
+
[SerializeField] private RectTransform handSpriteInGif;
|
|
20
23
|
private EventManager _eventManager;
|
|
21
24
|
private DataManager _dataManager;
|
|
22
25
|
private GameManager _gameManager;
|
|
@@ -24,10 +27,10 @@ namespace Hyper.Internal
|
|
|
24
27
|
private StartCTA _currentCTA;
|
|
25
28
|
private SwipeDirection _swipeDirection;
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
private bool _canAcceptInput = false;
|
|
28
31
|
private Vector2 _swipeStartPosition;
|
|
29
32
|
private bool _isTrackingSwipe;
|
|
30
|
-
private const float SWIPE_THRESHOLD = 50f;
|
|
33
|
+
private const float SWIPE_THRESHOLD = 50f;
|
|
31
34
|
|
|
32
35
|
void Awake()
|
|
33
36
|
{
|
|
@@ -37,9 +40,26 @@ namespace Hyper.Internal
|
|
|
37
40
|
_backendManager = HyperRuntime.BackendManager;
|
|
38
41
|
}
|
|
39
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
|
+
|
|
40
60
|
void Update()
|
|
41
61
|
{
|
|
42
|
-
if (!gameObject.activeSelf) return;
|
|
62
|
+
if (!gameObject.activeSelf || !_canAcceptInput) return;
|
|
43
63
|
|
|
44
64
|
if (_currentCTA == StartCTA.TapToPlay)
|
|
45
65
|
{
|
|
@@ -155,7 +175,7 @@ namespace Hyper.Internal
|
|
|
155
175
|
{
|
|
156
176
|
currentPosition = Input.mousePosition;
|
|
157
177
|
Vector2 delta = currentPosition - _swipeStartPosition;
|
|
158
|
-
|
|
178
|
+
|
|
159
179
|
if (IsSwipeDirectionValid(delta))
|
|
160
180
|
{
|
|
161
181
|
swipeDetected = true;
|
|
@@ -171,7 +191,7 @@ namespace Hyper.Internal
|
|
|
171
191
|
if (Input.touchCount > 0)
|
|
172
192
|
{
|
|
173
193
|
Touch touch = Input.GetTouch(0);
|
|
174
|
-
|
|
194
|
+
|
|
175
195
|
if (touch.phase == TouchPhase.Began)
|
|
176
196
|
{
|
|
177
197
|
_swipeStartPosition = touch.position;
|
|
@@ -181,7 +201,7 @@ namespace Hyper.Internal
|
|
|
181
201
|
{
|
|
182
202
|
currentPosition = touch.position;
|
|
183
203
|
Vector2 delta = currentPosition - _swipeStartPosition;
|
|
184
|
-
|
|
204
|
+
|
|
185
205
|
if (IsSwipeDirectionValid(delta))
|
|
186
206
|
{
|
|
187
207
|
swipeDetected = true;
|
|
@@ -308,10 +328,14 @@ namespace Hyper.Internal
|
|
|
308
328
|
case SwipeDirection.Down:
|
|
309
329
|
rotationZ = -90f;
|
|
310
330
|
anchoredPosition = verticalPosition;
|
|
331
|
+
handSpriteInGif.anchoredPosition = new Vector2(0, 40);
|
|
332
|
+
handSpriteInGif.transform.rotation = Quaternion.Euler(-180, 180, 0);
|
|
311
333
|
break;
|
|
312
334
|
case SwipeDirection.Left:
|
|
313
335
|
rotationZ = 180f;
|
|
314
336
|
anchoredPosition = horizontalPosition;
|
|
337
|
+
handSpriteInGif.anchoredPosition = new Vector2(0, 40);
|
|
338
|
+
handSpriteInGif.transform.rotation = Quaternion.Euler(0, 0, 180);
|
|
315
339
|
break;
|
|
316
340
|
case SwipeDirection.Right:
|
|
317
341
|
default:
|
|
@@ -23,7 +23,7 @@ AnimationClip:
|
|
|
23
23
|
m_Curve:
|
|
24
24
|
- serializedVersion: 3
|
|
25
25
|
time: 0
|
|
26
|
-
value: -
|
|
26
|
+
value: -80
|
|
27
27
|
inSlope: 0
|
|
28
28
|
outSlope: 0
|
|
29
29
|
tangentMode: 136
|
|
@@ -31,8 +31,8 @@ AnimationClip:
|
|
|
31
31
|
inWeight: 0.33333334
|
|
32
32
|
outWeight: 0.33333334
|
|
33
33
|
- serializedVersion: 3
|
|
34
|
-
time: 0.
|
|
35
|
-
value:
|
|
34
|
+
time: 0.42857143
|
|
35
|
+
value: 80
|
|
36
36
|
inSlope: 0
|
|
37
37
|
outSlope: 0
|
|
38
38
|
tangentMode: 136
|
|
@@ -40,8 +40,8 @@ AnimationClip:
|
|
|
40
40
|
inWeight: 0.33333334
|
|
41
41
|
outWeight: 0.33333334
|
|
42
42
|
- serializedVersion: 3
|
|
43
|
-
time: 0.
|
|
44
|
-
value:
|
|
43
|
+
time: 0.71428573
|
|
44
|
+
value: 80
|
|
45
45
|
inSlope: 0
|
|
46
46
|
outSlope: 0
|
|
47
47
|
tangentMode: 136
|
|
@@ -49,8 +49,8 @@ AnimationClip:
|
|
|
49
49
|
inWeight: 0.33333334
|
|
50
50
|
outWeight: 0.33333334
|
|
51
51
|
- serializedVersion: 3
|
|
52
|
-
time: 1.
|
|
53
|
-
value: -
|
|
52
|
+
time: 1.2857143
|
|
53
|
+
value: -80
|
|
54
54
|
inSlope: 0
|
|
55
55
|
outSlope: 0
|
|
56
56
|
tangentMode: 136
|
|
@@ -88,7 +88,7 @@ AnimationClip:
|
|
|
88
88
|
m_AdditiveReferencePoseClip: {fileID: 0}
|
|
89
89
|
m_AdditiveReferencePoseTime: 0
|
|
90
90
|
m_StartTime: 0
|
|
91
|
-
m_StopTime: 1.
|
|
91
|
+
m_StopTime: 1.2857143
|
|
92
92
|
m_OrientationOffsetY: 0
|
|
93
93
|
m_Level: 0
|
|
94
94
|
m_CycleOffset: 0
|
|
@@ -110,7 +110,7 @@ AnimationClip:
|
|
|
110
110
|
m_Curve:
|
|
111
111
|
- serializedVersion: 3
|
|
112
112
|
time: 0
|
|
113
|
-
value: -
|
|
113
|
+
value: -80
|
|
114
114
|
inSlope: 0
|
|
115
115
|
outSlope: 0
|
|
116
116
|
tangentMode: 136
|
|
@@ -118,8 +118,8 @@ AnimationClip:
|
|
|
118
118
|
inWeight: 0.33333334
|
|
119
119
|
outWeight: 0.33333334
|
|
120
120
|
- serializedVersion: 3
|
|
121
|
-
time: 0.
|
|
122
|
-
value:
|
|
121
|
+
time: 0.42857143
|
|
122
|
+
value: 80
|
|
123
123
|
inSlope: 0
|
|
124
124
|
outSlope: 0
|
|
125
125
|
tangentMode: 136
|
|
@@ -127,8 +127,8 @@ AnimationClip:
|
|
|
127
127
|
inWeight: 0.33333334
|
|
128
128
|
outWeight: 0.33333334
|
|
129
129
|
- serializedVersion: 3
|
|
130
|
-
time: 0.
|
|
131
|
-
value:
|
|
130
|
+
time: 0.71428573
|
|
131
|
+
value: 80
|
|
132
132
|
inSlope: 0
|
|
133
133
|
outSlope: 0
|
|
134
134
|
tangentMode: 136
|
|
@@ -136,8 +136,8 @@ AnimationClip:
|
|
|
136
136
|
inWeight: 0.33333334
|
|
137
137
|
outWeight: 0.33333334
|
|
138
138
|
- serializedVersion: 3
|
|
139
|
-
time: 1.
|
|
140
|
-
value: -
|
|
139
|
+
time: 1.2857143
|
|
140
|
+
value: -80
|
|
141
141
|
inSlope: 0
|
|
142
142
|
outSlope: 0
|
|
143
143
|
tangentMode: 136
|
|
@@ -138,6 +138,7 @@ MonoBehaviour:
|
|
|
138
138
|
startCtaLabel: {fileID: 3096530613615201642}
|
|
139
139
|
blinkingText: {fileID: 791952873962332395}
|
|
140
140
|
swipeGif: {fileID: 3581598360722608337}
|
|
141
|
+
handSpriteInGif: {fileID: 312166748021578777}
|
|
141
142
|
--- !u!1 &5738334876670918407
|
|
142
143
|
GameObject:
|
|
143
144
|
m_ObjectHideFlags: 0
|
|
@@ -248,7 +249,7 @@ RectTransform:
|
|
|
248
249
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
249
250
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
|
250
251
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
|
251
|
-
m_AnchoredPosition: {x: -
|
|
252
|
+
m_AnchoredPosition: {x: -90, y: -40}
|
|
252
253
|
m_SizeDelta: {x: 84.6344, y: 106.4023}
|
|
253
254
|
m_Pivot: {x: 0.5, y: 0.5}
|
|
254
255
|
--- !u!222 &7348338096052556359
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app.hypergames.hypersdk",
|
|
3
|
-
"version": "1.5.
|
|
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",
|