app.hypergames.hypersdk 1.9.0 → 1.10.0

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,22 @@
1
+ # [1.10.0](https://github.com/mvmhyper/hyper-sdk/compare/v1.9.1...v1.10.0) (2026-08-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **random:** match Unity Editor RNG contexts with WebGL ([80c6473](https://github.com/mvmhyper/hyper-sdk/commit/80c6473e3d1acdace2d704df1b3e47b0feee6d58))
7
+
8
+
9
+ ### Features
10
+
11
+ * **ui:** add scalable landscape control bar layout ([9ec837c](https://github.com/mvmhyper/hyper-sdk/commit/9ec837c98db3943868f6b5650e04e293f3786312))
12
+
13
+ ## [1.9.1](https://github.com/mvmhyper/hyper-sdk/compare/v1.9.0...v1.9.1) (2026-07-16)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * prevent orientation modal after game end ([efa33fa](https://github.com/mvmhyper/hyper-sdk/commit/efa33fa073218558dfa3ba3012b19a5151bbcfc9))
19
+
1
20
  # [1.9.0](https://github.com/mvmhyper/hyper-sdk/compare/v1.8.26...v1.9.0) (2026-07-09)
2
21
 
3
22
 
@@ -19,6 +19,11 @@ namespace Hyper.Internal.Managers
19
19
  /// </summary>
20
20
  internal sealed class GameManager : MonoBehaviour
21
21
  {
22
+ #if UNITY_WEBGL
23
+ [DllImport("__Internal")]
24
+ private static extern void MarkGameEndedOnHTML();
25
+ #endif
26
+
22
27
  #region Initialization
23
28
 
24
29
  private DataManager _dataManager;
@@ -119,7 +124,7 @@ namespace Hyper.Internal.Managers
119
124
  {
120
125
  if (IsBattleMode) return;
121
126
 
122
- _hasGameEnded = true;
127
+ SetGameEnded();
123
128
  HyperRuntime.Timer.StopAllTimers();
124
129
 
125
130
  if (!HyperRuntime.GameContent.IsPracticeMenu)
@@ -854,7 +859,7 @@ namespace Hyper.Internal.Managers
854
859
 
855
860
  private void EndGameInternal()
856
861
  {
857
- _hasGameEnded = true;
862
+ SetGameEnded();
858
863
 
859
864
  _eventManager.InvokeGameEndedEvent();
860
865
  HyperRuntime.Timer.StopAllTimers();
@@ -888,6 +893,17 @@ namespace Hyper.Internal.Managers
888
893
 
889
894
  #endregion
890
895
 
896
+ private void SetGameEnded()
897
+ {
898
+ if (_hasGameEnded) return;
899
+
900
+ _hasGameEnded = true;
901
+
902
+ #if UNITY_WEBGL && !UNITY_EDITOR
903
+ MarkGameEndedOnHTML();
904
+ #endif
905
+ }
906
+
891
907
  #region Safe Area Management
892
908
 
893
909
  private void ApplySafeArea()
@@ -1397,7 +1413,7 @@ namespace Hyper.Internal.Managers
1397
1413
 
1398
1414
  private void ShowTimeUpModalInternal()
1399
1415
  {
1400
- _hasGameEnded = true;
1416
+ SetGameEnded();
1401
1417
 
1402
1418
  if (_timeUpModal == null)
1403
1419
  {
@@ -0,0 +1,147 @@
1
+ using UnityEngine;
2
+ using UnityEngine.Sprites;
3
+ using UnityEngine.UI;
4
+
5
+ namespace Hyper.Internal
6
+ {
7
+ /// <summary>
8
+ /// Applies a pixel-configurable, rounded bottom cutout to a standard uGUI Image.
9
+ /// The assigned sprite, Image color, UI masks, and raycast target remain supported.
10
+ /// </summary>
11
+ [ExecuteAlways]
12
+ [DisallowMultipleComponent]
13
+ [RequireComponent(typeof(Image))]
14
+ public sealed class ConcaveImage : MonoBehaviour
15
+ {
16
+ private const string ShaderResourcePath = "Shaders/ConcaveImage";
17
+ private const string ShaderName = "Hyper/UI/Concave Image";
18
+ private const float PortraitCutoutHeight = 55f;
19
+ private const float LandscapeCutoutHeight = 35f;
20
+
21
+ private static readonly int RectSizeId = Shader.PropertyToID("_RectSize");
22
+ private static readonly int PivotId = Shader.PropertyToID("_Pivot");
23
+ private static readonly int SpriteUVRectId = Shader.PropertyToID("_SpriteUVRect");
24
+ private static readonly int SideInsetId = Shader.PropertyToID("_SideInset");
25
+ private static readonly int CutoutHeightId = Shader.PropertyToID("_CutoutHeight");
26
+ private static readonly int CornerRadiusId = Shader.PropertyToID("_CornerRadius");
27
+ private static readonly int AASoftnessId = Shader.PropertyToID("_AASoftness");
28
+
29
+ [Header("Cutout (UI pixels)")]
30
+ [SerializeField, Min(0f)] private float sideInset = 32f;
31
+ [SerializeField, Min(0f)] private float cutoutHeight = 30f;
32
+ [SerializeField, Min(0f)] private float cornerRadius = 30f;
33
+ [SerializeField, Min(0.25f)] private float aaSoftness = 1f;
34
+
35
+ private Image image;
36
+ private RectTransform rectTransform;
37
+ private Material materialInstance;
38
+ private bool? lastPortraitState;
39
+
40
+ public float SideInset { get => sideInset; set { sideInset = Mathf.Max(0f, value); ApplyProperties(); } }
41
+ public float CutoutHeight { get => cutoutHeight; set { cutoutHeight = Mathf.Max(0f, value); ApplyProperties(); } }
42
+ public float CornerRadius { get => cornerRadius; set { cornerRadius = Mathf.Max(0f, value); ApplyProperties(); } }
43
+
44
+ private void OnEnable()
45
+ {
46
+ EnsureMaterial();
47
+ SyncCutoutHeightWithOrientation();
48
+ ApplyProperties();
49
+ }
50
+
51
+ private void Update()
52
+ {
53
+ SyncCutoutHeightWithOrientation();
54
+ }
55
+
56
+ private void OnValidate()
57
+ {
58
+ sideInset = Mathf.Max(0f, sideInset);
59
+ cutoutHeight = Mathf.Max(0f, cutoutHeight);
60
+ cornerRadius = Mathf.Max(0f, cornerRadius);
61
+ aaSoftness = Mathf.Max(0.25f, aaSoftness);
62
+
63
+ if (!isActiveAndEnabled) return;
64
+ EnsureMaterial();
65
+ ApplyProperties();
66
+ }
67
+
68
+ private void OnRectTransformDimensionsChange()
69
+ {
70
+ ApplyProperties();
71
+ }
72
+
73
+ private void OnDidApplyAnimation()
74
+ {
75
+ ApplyProperties();
76
+ }
77
+
78
+ private void SyncCutoutHeightWithOrientation()
79
+ {
80
+ if (!Application.isPlaying) return;
81
+
82
+ var gameManager = HyperRuntime.GameManager;
83
+ if (gameManager == null) return;
84
+
85
+ bool isPortrait = gameManager.IsPortrait();
86
+ if (lastPortraitState == isPortrait) return;
87
+
88
+ lastPortraitState = isPortrait;
89
+ cutoutHeight = isPortrait ? PortraitCutoutHeight : LandscapeCutoutHeight;
90
+ ApplyProperties();
91
+ }
92
+
93
+ private void OnDestroy()
94
+ {
95
+ if (materialInstance == null) return;
96
+
97
+ if (Application.isPlaying) Destroy(materialInstance);
98
+ else DestroyImmediate(materialInstance);
99
+ }
100
+
101
+ private void EnsureMaterial()
102
+ {
103
+ if (image == null) image = GetComponent<Image>();
104
+ if (rectTransform == null) rectTransform = transform as RectTransform;
105
+
106
+ if (materialInstance != null)
107
+ {
108
+ if (image.material != materialInstance) image.material = materialInstance;
109
+ return;
110
+ }
111
+
112
+ Shader shader = Resources.Load<Shader>(ShaderResourcePath);
113
+ if (shader == null) shader = Shader.Find(ShaderName);
114
+ if (shader == null)
115
+ {
116
+ Debug.LogWarning($"{nameof(ConcaveImage)} could not find shader '{ShaderName}'.", this);
117
+ return;
118
+ }
119
+
120
+ materialInstance = new Material(shader)
121
+ {
122
+ name = $"{name} Concave Image (Instance)",
123
+ hideFlags = HideFlags.HideAndDontSave
124
+ };
125
+ image.material = materialInstance;
126
+ }
127
+
128
+ private void ApplyProperties()
129
+ {
130
+ if (materialInstance == null || rectTransform == null) return;
131
+
132
+ Vector2 size = rectTransform.rect.size;
133
+ Vector2 pivot = rectTransform.pivot;
134
+ Vector4 spriteUV = image.sprite != null
135
+ ? DataUtility.GetOuterUV(image.sprite)
136
+ : new Vector4(0f, 0f, 1f, 1f);
137
+ materialInstance.SetVector(RectSizeId, new Vector4(size.x, size.y, 0f, 0f));
138
+ materialInstance.SetVector(PivotId, new Vector4(pivot.x, pivot.y, 0f, 0f));
139
+ materialInstance.SetVector(SpriteUVRectId, spriteUV);
140
+ materialInstance.SetFloat(SideInsetId, sideInset);
141
+ materialInstance.SetFloat(CutoutHeightId, cutoutHeight);
142
+ materialInstance.SetFloat(CornerRadiusId, cornerRadius);
143
+ materialInstance.SetFloat(AASoftnessId, aaSoftness);
144
+ image.SetMaterialDirty();
145
+ }
146
+ }
147
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: d8d6fbd710f94d5ab0779c13789d66d7
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -2,6 +2,7 @@ using Hyper.Internal.Managers;
2
2
  using Hyper.Shared;
3
3
  using TMPro;
4
4
  using UnityEngine;
5
+ using UnityEngine.Serialization;
5
6
  using UnityEngine.UI;
6
7
 
7
8
  namespace Hyper.Internal
@@ -9,7 +10,10 @@ namespace Hyper.Internal
9
10
  internal class ControlBar : MonoBehaviour
10
11
  {
11
12
  [Header("UI Components")]
12
- public Image roundedBG;
13
+ [Tooltip("Legacy content container. Its Image is disabled; it is no longer used as the visual control-bar background.")]
14
+ public GameObject roundedBG;
15
+ [Tooltip("Procedural control-bar background containing the ConcaveImage component.")]
16
+ [SerializeField] private Image controlBarBackground;
13
17
  [SerializeField] TextMeshProUGUI scoreText;
14
18
  [SerializeField] private RectTransform scoreTextRect;
15
19
  [SerializeField] private RectTransform timerText;
@@ -17,6 +21,9 @@ namespace Hyper.Internal
17
21
  [SerializeField] private Image pauseButtonImage;
18
22
  [SerializeField] private Image pauseBarsImage;
19
23
  [SerializeField] private Button connectionStatusIcon;
24
+ [Tooltip("Shown only for the Hearts Left layout in landscape orientation.")]
25
+ [FormerlySerializedAs("pcLandscapeHeartsDivider")]
26
+ [SerializeField] private GameObject landscapeHeartsDivider;
20
27
 
21
28
  [Header("Sprites")]
22
29
  [SerializeField] Sprite pauseBarsLight;
@@ -46,6 +53,9 @@ namespace Hyper.Internal
46
53
  private const float DEFAULT_LAYOUT_SCORE_FONT_SIZE = 100f;
47
54
  private const float DEFAULT_LAYOUT_TIMER_FONT_SIZE = 60f;
48
55
 
56
+ private const float LANDSCAPE_HEARTS_TIMER_X = -80f;
57
+ private const float LANDSCAPE_HEARTS_SCORE_X = 285.2284f;
58
+
49
59
  // Theme constants
50
60
  private const string LIGHT_THEME_BG_COLOR = "#F5F5F5";
51
61
  private const string LIGHT_THEME_TEXT_COLOR = "#434343";
@@ -58,6 +68,7 @@ namespace Hyper.Internal
58
68
  void Awake()
59
69
  {
60
70
  _gameManager = HyperRuntime.GameManager;
71
+ ConfigureControlBarBackground();
61
72
  CacheTextComponents();
62
73
 
63
74
  RectTransform rect = transform.GetComponent<RectTransform>();
@@ -68,6 +79,18 @@ namespace Hyper.Internal
68
79
  connectionStatusIcon.onClick.AddListener(ShowConnectionLostStatus);
69
80
  }
70
81
 
82
+ private void ConfigureControlBarBackground()
83
+ {
84
+ if (controlBarBackground == null)
85
+ {
86
+ ConcaveImage concaveImage = GetComponentInChildren<ConcaveImage>(true);
87
+ if (concaveImage != null)
88
+ {
89
+ controlBarBackground = concaveImage.GetComponent<Image>();
90
+ }
91
+ }
92
+ }
93
+
71
94
  private void OnDestroy()
72
95
  {
73
96
  connectionStatusIcon.onClick.RemoveListener(ShowConnectionLostStatus);
@@ -93,10 +116,26 @@ namespace Hyper.Internal
93
116
 
94
117
  private void ConfigureLayout()
95
118
  {
119
+ bool useLandscapeHeartsLayout =
120
+ _gameManager.ControlBarLayout == ControlBarLayout.HeartsLeft &&
121
+ !_gameManager.IsPortrait();
122
+
123
+ if (landscapeHeartsDivider != null)
124
+ {
125
+ landscapeHeartsDivider.SetActive(useLandscapeHeartsLayout);
126
+ }
127
+
96
128
  switch (_gameManager.ControlBarLayout)
97
129
  {
98
130
  case ControlBarLayout.HeartsLeft:
99
- ApplyCenteredLayout();
131
+ if (useLandscapeHeartsLayout)
132
+ {
133
+ ApplyLandscapeHeartsLayout();
134
+ }
135
+ else
136
+ {
137
+ ApplyCenteredLayout();
138
+ }
100
139
  SetupLivesDisplay();
101
140
  break;
102
141
  case ControlBarLayout.HealthBarLeft:
@@ -215,6 +254,24 @@ namespace Hyper.Internal
215
254
  _timerTextComponent.alignment = TextAlignmentOptions.MidlineLeft;
216
255
  }
217
256
 
257
+ private void ApplyLandscapeHeartsLayout()
258
+ {
259
+ // Begin with the standard score/timer sizing and vertical positions.
260
+ ApplyDefaultLayout();
261
+
262
+ timerText.anchorMin = new Vector2(0.5f, 0.5f);
263
+ timerText.anchorMax = new Vector2(0.5f, 0.5f);
264
+ timerText.pivot = new Vector2(0.5f, 0.5f);
265
+ timerText.anchoredPosition = new Vector2(LANDSCAPE_HEARTS_TIMER_X, DEFAULT_LAYOUT_TIMER_Y);
266
+ _timerTextComponent.alignment = TextAlignmentOptions.MidlineRight;
267
+
268
+ scoreTextRect.anchorMin = new Vector2(0.5f, 0.5f);
269
+ scoreTextRect.anchorMax = new Vector2(0.5f, 0.5f);
270
+ scoreTextRect.pivot = new Vector2(0.5f, 0.5f);
271
+ scoreTextRect.anchoredPosition = new Vector2(LANDSCAPE_HEARTS_SCORE_X, DEFAULT_LAYOUT_SCORE_Y);
272
+ _scoreTextComponent.alignment = TextAlignmentOptions.MidlineLeft;
273
+ }
274
+
218
275
  private void ConfigureTheme()
219
276
  {
220
277
  switch (_gameManager.ControlBarTheme)
@@ -230,7 +287,7 @@ namespace Hyper.Internal
230
287
 
231
288
  private void ApplyDarkTheme()
232
289
  {
233
- roundedBG.color = Color.black;
290
+ if (controlBarBackground != null) controlBarBackground.color = Color.black;
234
291
  safeAreaFillerBG.color = Color.black;
235
292
 
236
293
  _scoreTextComponent.color = Color.white;
@@ -245,7 +302,7 @@ namespace Hyper.Internal
245
302
  Color bgColor = HexToColor(LIGHT_THEME_BG_COLOR);
246
303
  Color textColor = HexToColor(LIGHT_THEME_TEXT_COLOR);
247
304
 
248
- roundedBG.color = bgColor;
305
+ if (controlBarBackground != null) controlBarBackground.color = bgColor;
249
306
  safeAreaFillerBG.color = bgColor;
250
307
 
251
308
  _scoreTextComponent.color = textColor;
@@ -74,14 +74,7 @@ namespace Hyper.Internal
74
74
 
75
75
  private void ConfigureOrientation(RectTransform rect)
76
76
  {
77
- if (HyperRuntime.GameManager.IsPortrait())
78
- {
79
- rect.sizeDelta = new Vector2(rect.sizeDelta.x, 150);
80
- }
81
- else
82
- {
83
- rect.sizeDelta = new Vector2(rect.sizeDelta.x, 180);
84
- }
77
+ rect.sizeDelta = new Vector2(rect.sizeDelta.x, 163.909f);
85
78
  }
86
79
 
87
80
  void OnDisable()
@@ -140,7 +133,7 @@ namespace Hyper.Internal
140
133
 
141
134
  private void SlideInAndOutAnimation(bool pingPong = true)
142
135
  {
143
- int yOffset = HyperRuntime.GameManager.IsPortrait() ? 150 : 180;
136
+ int yOffset = 165;
144
137
  rectTransform.DOAnchorPosY(-yOffset, 0.45f).SetUpdate(true).SetEase(HyperTween.Ease.InQuad).OnComplete(() =>
145
138
  {
146
139
  if (pingPong)
@@ -44,6 +44,14 @@ mergeInto(LibraryManager.library, {
44
44
  }
45
45
  },
46
46
 
47
+ MarkGameEndedOnHTML: function () {
48
+ if (window.markGameEnded) {
49
+ window.markGameEnded();
50
+ } else {
51
+ console.error("markGameEnded() not found!");
52
+ }
53
+ },
54
+
47
55
  MarkGameLoadedOnHTML: function () {
48
56
  if (window.markGameLoaded) {
49
57
  window.markGameLoaded();
@@ -184,4 +192,4 @@ mergeInto(LibraryManager.library, {
184
192
  console.error('Unity: iOS inline video fix error', err);
185
193
  }
186
194
  }
187
- });
195
+ });
@@ -0,0 +1,155 @@
1
+ Shader "Hyper/UI/Concave Image"
2
+ {
3
+ Properties
4
+ {
5
+ [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
6
+ _Color ("Tint", Color) = (1,1,1,1)
7
+ _RectSize ("Rect Size", Vector) = (400,120,0,0)
8
+ _Pivot ("Pivot", Vector) = (0.5,0.5,0,0)
9
+ _SpriteUVRect ("Sprite UV Rect", Vector) = (0,0,1,1)
10
+ _SideInset ("Side Inset", Float) = 32
11
+ _CutoutHeight ("Cutout Height", Float) = 30
12
+ _CornerRadius ("Corner Radius", Float) = 30
13
+ _AASoftness ("AA Softness", Float) = 1
14
+
15
+ _StencilComp ("Stencil Comparison", Float) = 8
16
+ _Stencil ("Stencil ID", Float) = 0
17
+ _StencilOp ("Stencil Operation", Float) = 0
18
+ _StencilWriteMask ("Stencil Write Mask", Float) = 255
19
+ _StencilReadMask ("Stencil Read Mask", Float) = 255
20
+ _ColorMask ("Color Mask", Float) = 15
21
+ [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
22
+ }
23
+
24
+ SubShader
25
+ {
26
+ Tags
27
+ {
28
+ "Queue"="Transparent"
29
+ "IgnoreProjector"="True"
30
+ "RenderType"="Transparent"
31
+ "PreviewType"="Plane"
32
+ "CanUseSpriteAtlas"="True"
33
+ }
34
+
35
+ Stencil
36
+ {
37
+ Ref [_Stencil]
38
+ Comp [_StencilComp]
39
+ Pass [_StencilOp]
40
+ ReadMask [_StencilReadMask]
41
+ WriteMask [_StencilWriteMask]
42
+ }
43
+
44
+ Cull Off
45
+ Lighting Off
46
+ ZWrite Off
47
+ ZTest [unity_GUIZTestMode]
48
+ Blend SrcAlpha OneMinusSrcAlpha
49
+ ColorMask [_ColorMask]
50
+
51
+ Pass
52
+ {
53
+ Name "Default"
54
+
55
+ CGPROGRAM
56
+ #pragma vertex vert
57
+ #pragma fragment frag
58
+ #pragma target 3.0
59
+ #pragma multi_compile_local _ UNITY_UI_CLIP_RECT
60
+ #pragma multi_compile_local _ UNITY_UI_ALPHACLIP
61
+
62
+ #include "UnityCG.cginc"
63
+ #include "UnityUI.cginc"
64
+
65
+ struct appdata_t
66
+ {
67
+ float4 vertex : POSITION;
68
+ float4 color : COLOR;
69
+ float2 texcoord : TEXCOORD0;
70
+ UNITY_VERTEX_INPUT_INSTANCE_ID
71
+ };
72
+
73
+ struct v2f
74
+ {
75
+ float4 vertex : SV_POSITION;
76
+ fixed4 color : COLOR;
77
+ float2 texcoord : TEXCOORD0;
78
+ float4 worldPosition : TEXCOORD1;
79
+ float2 localPosition : TEXCOORD2;
80
+ UNITY_VERTEX_OUTPUT_STEREO
81
+ };
82
+
83
+ sampler2D _MainTex;
84
+ fixed4 _Color;
85
+ fixed4 _TextureSampleAdd;
86
+ float4 _ClipRect;
87
+ float4 _MainTex_ST;
88
+ float4 _RectSize;
89
+ float4 _Pivot;
90
+ float4 _SpriteUVRect;
91
+ float _SideInset;
92
+ float _CutoutHeight;
93
+ float _CornerRadius;
94
+ float _AASoftness;
95
+
96
+ v2f vert(appdata_t v)
97
+ {
98
+ v2f OUT;
99
+ UNITY_SETUP_INSTANCE_ID(v);
100
+ UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
101
+ OUT.worldPosition = v.vertex;
102
+ OUT.vertex = UnityObjectToClipPos(v.vertex);
103
+ OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
104
+ OUT.localPosition = v.vertex.xy;
105
+ OUT.color = v.color * _Color;
106
+ return OUT;
107
+ }
108
+
109
+ // Signed distance to a rectangle with uniformly rounded corners.
110
+ float RoundedBoxDistance(float2 p, float2 halfSize, float radius)
111
+ {
112
+ float2 q = abs(p) - halfSize + radius;
113
+ return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - radius;
114
+ }
115
+
116
+ fixed4 frag(v2f IN) : SV_Target
117
+ {
118
+ half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
119
+
120
+ float2 size = max(_RectSize.xy, float2(1.0, 1.0));
121
+ float2 uvSpan = max(_SpriteUVRect.zw - _SpriteUVRect.xy, float2(0.000001, 0.000001));
122
+ float2 shapeUV = saturate((IN.texcoord - _SpriteUVRect.xy) / uvSpan);
123
+ float2 p = shapeUV * size;
124
+
125
+ float inset = clamp(_SideInset, 0.0, size.x * 0.5);
126
+ float cutoutHeight = clamp(_CutoutHeight, 0.0, size.y);
127
+ float cutoutHalfWidth = max(0.0, size.x * 0.5 - inset);
128
+ float radius = min(max(_CornerRadius, 0.0), min(cutoutHalfWidth, cutoutHeight));
129
+
130
+ // Extend the rounded cutout below the Image. Only its two upper
131
+ // corners intersect the visible UI rectangle.
132
+ float lowerExtent = size.y + radius + 2.0;
133
+ float2 cutoutCenter = float2(size.x * 0.5, (cutoutHeight - lowerExtent) * 0.5);
134
+ float2 cutoutHalfSize = float2(cutoutHalfWidth, (cutoutHeight + lowerExtent) * 0.5);
135
+ float cutoutDistance = RoundedBoxDistance(p - cutoutCenter, cutoutHalfSize, radius);
136
+
137
+ // fwidth keeps the transition approximately one screen pixel wide.
138
+ float aa = max(fwidth(cutoutDistance) * max(_AASoftness, 0.25), 0.0001);
139
+ float shape = smoothstep(-aa, aa, cutoutDistance);
140
+ color.a *= shape;
141
+
142
+ #ifdef UNITY_UI_CLIP_RECT
143
+ color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
144
+ #endif
145
+
146
+ #ifdef UNITY_UI_ALPHACLIP
147
+ clip(color.a - 0.001);
148
+ #endif
149
+
150
+ return color;
151
+ }
152
+ ENDCG
153
+ }
154
+ }
155
+ }
@@ -0,0 +1,10 @@
1
+ fileFormatVersion: 2
2
+ guid: 113e6b835bde4516bb8043cfe8f3adab
3
+ ShaderImporter:
4
+ externalObjects: {}
5
+ defaultTextures: []
6
+ nonModifiableTextures: []
7
+ preprocessorOverride: 0
8
+ userData:
9
+ assetBundleName:
10
+ assetBundleVariant:
@@ -227,8 +227,6 @@ GameObject:
227
227
  serializedVersion: 6
228
228
  m_Component:
229
229
  - component: {fileID: 169989670260607081}
230
- - component: {fileID: 8283029980859711652}
231
- - component: {fileID: 319378978593858649}
232
230
  m_Layer: 5
233
231
  m_Name: RoundedBG
234
232
  m_TagString: Untagged
@@ -251,6 +249,7 @@ RectTransform:
251
249
  - {fileID: 4203918634244751565}
252
250
  - {fileID: 3751917781741926748}
253
251
  - {fileID: 2951596604433264409}
252
+ - {fileID: 4778177808955477617}
254
253
  - {fileID: 5674028873514353123}
255
254
  - {fileID: 19893713024797808}
256
255
  m_Father: {fileID: 4867582869548686450}
@@ -260,44 +259,6 @@ RectTransform:
260
259
  m_AnchoredPosition: {x: 0, y: 0}
261
260
  m_SizeDelta: {x: 0, y: 0.00012207}
262
261
  m_Pivot: {x: 0.5, y: 0.5}
263
- --- !u!222 &8283029980859711652
264
- CanvasRenderer:
265
- m_ObjectHideFlags: 0
266
- m_CorrespondingSourceObject: {fileID: 0}
267
- m_PrefabInstance: {fileID: 0}
268
- m_PrefabAsset: {fileID: 0}
269
- m_GameObject: {fileID: 1442877918737098795}
270
- m_CullTransparentMesh: 1
271
- --- !u!114 &319378978593858649
272
- MonoBehaviour:
273
- m_ObjectHideFlags: 0
274
- m_CorrespondingSourceObject: {fileID: 0}
275
- m_PrefabInstance: {fileID: 0}
276
- m_PrefabAsset: {fileID: 0}
277
- m_GameObject: {fileID: 1442877918737098795}
278
- m_Enabled: 1
279
- m_EditorHideFlags: 0
280
- m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
281
- m_Name:
282
- m_EditorClassIdentifier:
283
- m_Material: {fileID: 0}
284
- m_Color: {r: 0, g: 0, b: 0, a: 1}
285
- m_RaycastTarget: 1
286
- m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
287
- m_Maskable: 1
288
- m_OnCullStateChanged:
289
- m_PersistentCalls:
290
- m_Calls: []
291
- m_Sprite: {fileID: 21300000, guid: 72b18270f6563fe49bb2d813995c0969, type: 3}
292
- m_Type: 1
293
- m_PreserveAspect: 0
294
- m_FillCenter: 1
295
- m_FillMethod: 4
296
- m_FillAmount: 1
297
- m_FillClockwise: 1
298
- m_FillOrigin: 0
299
- m_UseSpriteMesh: 1
300
- m_PixelsPerUnitMultiplier: 2.245
301
262
  --- !u!1 &2011323868837924026
302
263
  GameObject:
303
264
  m_ObjectHideFlags: 0
@@ -973,6 +934,81 @@ MonoBehaviour:
973
934
  m_Name:
974
935
  m_EditorClassIdentifier:
975
936
  notifyDot: {fileID: 8984078937237801384}
937
+ --- !u!1 &5140490410473491407
938
+ GameObject:
939
+ m_ObjectHideFlags: 0
940
+ m_CorrespondingSourceObject: {fileID: 0}
941
+ m_PrefabInstance: {fileID: 0}
942
+ m_PrefabAsset: {fileID: 0}
943
+ serializedVersion: 6
944
+ m_Component:
945
+ - component: {fileID: 4778177808955477617}
946
+ - component: {fileID: 3625439848123506339}
947
+ - component: {fileID: 7277656695502730588}
948
+ m_Layer: 5
949
+ m_Name: Divider
950
+ m_TagString: Untagged
951
+ m_Icon: {fileID: 0}
952
+ m_NavMeshLayer: 0
953
+ m_StaticEditorFlags: 0
954
+ m_IsActive: 0
955
+ --- !u!224 &4778177808955477617
956
+ RectTransform:
957
+ m_ObjectHideFlags: 0
958
+ m_CorrespondingSourceObject: {fileID: 0}
959
+ m_PrefabInstance: {fileID: 0}
960
+ m_PrefabAsset: {fileID: 0}
961
+ m_GameObject: {fileID: 5140490410473491407}
962
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
963
+ m_LocalPosition: {x: 0, y: 0, z: 0}
964
+ m_LocalScale: {x: 0.75, y: 0.75, z: 0.75}
965
+ m_ConstrainProportionsScale: 1
966
+ m_Children: []
967
+ m_Father: {fileID: 169989670260607081}
968
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
969
+ m_AnchorMin: {x: 0.5, y: 0.5}
970
+ m_AnchorMax: {x: 0.5, y: 0.5}
971
+ m_AnchoredPosition: {x: 0, y: 10}
972
+ m_SizeDelta: {x: 5.75, y: 87.01}
973
+ m_Pivot: {x: 0.5, y: 0.5}
974
+ --- !u!222 &3625439848123506339
975
+ CanvasRenderer:
976
+ m_ObjectHideFlags: 0
977
+ m_CorrespondingSourceObject: {fileID: 0}
978
+ m_PrefabInstance: {fileID: 0}
979
+ m_PrefabAsset: {fileID: 0}
980
+ m_GameObject: {fileID: 5140490410473491407}
981
+ m_CullTransparentMesh: 1
982
+ --- !u!114 &7277656695502730588
983
+ MonoBehaviour:
984
+ m_ObjectHideFlags: 0
985
+ m_CorrespondingSourceObject: {fileID: 0}
986
+ m_PrefabInstance: {fileID: 0}
987
+ m_PrefabAsset: {fileID: 0}
988
+ m_GameObject: {fileID: 5140490410473491407}
989
+ m_Enabled: 1
990
+ m_EditorHideFlags: 0
991
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
992
+ m_Name:
993
+ m_EditorClassIdentifier:
994
+ m_Material: {fileID: 0}
995
+ m_Color: {r: 1, g: 1, b: 1, a: 0.12941177}
996
+ m_RaycastTarget: 1
997
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
998
+ m_Maskable: 1
999
+ m_OnCullStateChanged:
1000
+ m_PersistentCalls:
1001
+ m_Calls: []
1002
+ m_Sprite: {fileID: 0}
1003
+ m_Type: 0
1004
+ m_PreserveAspect: 0
1005
+ m_FillCenter: 1
1006
+ m_FillMethod: 4
1007
+ m_FillAmount: 1
1008
+ m_FillClockwise: 1
1009
+ m_FillOrigin: 0
1010
+ m_UseSpriteMesh: 0
1011
+ m_PixelsPerUnitMultiplier: 1
976
1012
  --- !u!1 &5339568130972733649
977
1013
  GameObject:
978
1014
  m_ObjectHideFlags: 0
@@ -1426,6 +1462,7 @@ RectTransform:
1426
1462
  m_ConstrainProportionsScale: 0
1427
1463
  m_Children:
1428
1464
  - {fileID: 4240924857980101905}
1465
+ - {fileID: 322868136551664513}
1429
1466
  - {fileID: 169989670260607081}
1430
1467
  m_Father: {fileID: 0}
1431
1468
  m_LocalEulerAnglesHint: {x: 0, y: -0, z: -0}
@@ -1446,7 +1483,8 @@ MonoBehaviour:
1446
1483
  m_Script: {fileID: 11500000, guid: 4530c265ba5f5734789ce90df80e4916, type: 3}
1447
1484
  m_Name:
1448
1485
  m_EditorClassIdentifier:
1449
- roundedBG: {fileID: 319378978593858649}
1486
+ roundedBG: {fileID: 1442877918737098795}
1487
+ controlBarBackground: {fileID: 4892688524737625225}
1450
1488
  scoreText: {fileID: 8299416075969076690}
1451
1489
  scoreTextRect: {fileID: 3751917781741926748}
1452
1490
  timerText: {fileID: 2951596604433264409}
@@ -1454,6 +1492,7 @@ MonoBehaviour:
1454
1492
  pauseButtonImage: {fileID: 6337179202905528179}
1455
1493
  pauseBarsImage: {fileID: 7880691058749829457}
1456
1494
  connectionStatusIcon: {fileID: 8600269090702546619}
1495
+ pcLandscapeHeartsDivider: {fileID: 5140490410473491407}
1457
1496
  pauseBarsLight: {fileID: 21300000, guid: 5bf785ff9f45bcf4a89ffc70e363eb69, type: 3}
1458
1497
  pauseBarsDark: {fileID: 21300000, guid: 023ea868e45992b46ab65bc4b6fb72c7, type: 3}
1459
1498
  livesDisplayPrefab: {fileID: 5031749136894004241, guid: b7f1d0f9e3734df4c9feb3385b835f4b, type: 3}
@@ -2049,3 +2088,144 @@ RectTransform:
2049
2088
  m_CorrespondingSourceObject: {fileID: 5246928450468791847, guid: b7f1d0f9e3734df4c9feb3385b835f4b, type: 3}
2050
2089
  m_PrefabInstance: {fileID: 5230500621501467223}
2051
2090
  m_PrefabAsset: {fileID: 0}
2091
+ --- !u!1001 &8007402091709298309
2092
+ PrefabInstance:
2093
+ m_ObjectHideFlags: 0
2094
+ serializedVersion: 2
2095
+ m_Modification:
2096
+ serializedVersion: 3
2097
+ m_TransformParent: {fileID: 4867582869548686450}
2098
+ m_Modifications:
2099
+ - target: {fileID: 975678129233418977, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2100
+ propertyPath: m_Name
2101
+ value: Rounded Cutout
2102
+ objectReference: {fileID: 0}
2103
+ - target: {fileID: 3226358049917684236, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2104
+ propertyPath: m_Color.b
2105
+ value: 0
2106
+ objectReference: {fileID: 0}
2107
+ - target: {fileID: 3226358049917684236, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2108
+ propertyPath: m_Color.g
2109
+ value: 0
2110
+ objectReference: {fileID: 0}
2111
+ - target: {fileID: 3226358049917684236, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2112
+ propertyPath: m_Color.r
2113
+ value: 0
2114
+ objectReference: {fileID: 0}
2115
+ - target: {fileID: 6574686447719444045, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2116
+ propertyPath: cutoutColor.b
2117
+ value: 0
2118
+ objectReference: {fileID: 0}
2119
+ - target: {fileID: 6574686447719444045, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2120
+ propertyPath: cutoutColor.g
2121
+ value: 0
2122
+ objectReference: {fileID: 0}
2123
+ - target: {fileID: 6574686447719444045, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2124
+ propertyPath: cutoutColor.r
2125
+ value: 0
2126
+ objectReference: {fileID: 0}
2127
+ - target: {fileID: 6574686447719444045, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2128
+ propertyPath: transparentCutout
2129
+ value: 1
2130
+ objectReference: {fileID: 0}
2131
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2132
+ propertyPath: m_Pivot.x
2133
+ value: 0.5
2134
+ objectReference: {fileID: 0}
2135
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2136
+ propertyPath: m_Pivot.y
2137
+ value: 0.5
2138
+ objectReference: {fileID: 0}
2139
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2140
+ propertyPath: m_AnchorMax.x
2141
+ value: 1
2142
+ objectReference: {fileID: 0}
2143
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2144
+ propertyPath: m_AnchorMax.y
2145
+ value: 1
2146
+ objectReference: {fileID: 0}
2147
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2148
+ propertyPath: m_AnchorMin.x
2149
+ value: 0
2150
+ objectReference: {fileID: 0}
2151
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2152
+ propertyPath: m_AnchorMin.y
2153
+ value: 1
2154
+ objectReference: {fileID: 0}
2155
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2156
+ propertyPath: m_SizeDelta.x
2157
+ value: 0
2158
+ objectReference: {fileID: 0}
2159
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2160
+ propertyPath: m_SizeDelta.y
2161
+ value: 163.909
2162
+ objectReference: {fileID: 0}
2163
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2164
+ propertyPath: m_LocalPosition.x
2165
+ value: 0
2166
+ objectReference: {fileID: 0}
2167
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2168
+ propertyPath: m_LocalPosition.y
2169
+ value: 0
2170
+ objectReference: {fileID: 0}
2171
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2172
+ propertyPath: m_LocalPosition.z
2173
+ value: 0
2174
+ objectReference: {fileID: 0}
2175
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2176
+ propertyPath: m_LocalRotation.w
2177
+ value: 1
2178
+ objectReference: {fileID: 0}
2179
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2180
+ propertyPath: m_LocalRotation.x
2181
+ value: -0
2182
+ objectReference: {fileID: 0}
2183
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2184
+ propertyPath: m_LocalRotation.y
2185
+ value: -0
2186
+ objectReference: {fileID: 0}
2187
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2188
+ propertyPath: m_LocalRotation.z
2189
+ value: -0
2190
+ objectReference: {fileID: 0}
2191
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2192
+ propertyPath: m_AnchoredPosition.x
2193
+ value: 0
2194
+ objectReference: {fileID: 0}
2195
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2196
+ propertyPath: m_AnchoredPosition.y
2197
+ value: -81.954384
2198
+ objectReference: {fileID: 0}
2199
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2200
+ propertyPath: m_LocalEulerAnglesHint.x
2201
+ value: 0
2202
+ objectReference: {fileID: 0}
2203
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2204
+ propertyPath: m_LocalEulerAnglesHint.y
2205
+ value: 0
2206
+ objectReference: {fileID: 0}
2207
+ - target: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2208
+ propertyPath: m_LocalEulerAnglesHint.z
2209
+ value: 0
2210
+ objectReference: {fileID: 0}
2211
+ m_RemovedComponents: []
2212
+ m_RemovedGameObjects: []
2213
+ m_AddedGameObjects: []
2214
+ m_AddedComponents: []
2215
+ m_SourcePrefab: {fileID: 100100000, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2216
+ --- !u!224 &322868136551664513 stripped
2217
+ RectTransform:
2218
+ m_CorrespondingSourceObject: {fileID: 7735793393820318980, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2219
+ m_PrefabInstance: {fileID: 8007402091709298309}
2220
+ m_PrefabAsset: {fileID: 0}
2221
+ --- !u!114 &4892688524737625225 stripped
2222
+ MonoBehaviour:
2223
+ m_CorrespondingSourceObject: {fileID: 3226358049917684236, guid: 0e545819b3885594c9778fcc906c58ce, type: 3}
2224
+ m_PrefabInstance: {fileID: 8007402091709298309}
2225
+ m_PrefabAsset: {fileID: 0}
2226
+ m_GameObject: {fileID: 0}
2227
+ m_Enabled: 1
2228
+ m_EditorHideFlags: 0
2229
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
2230
+ m_Name:
2231
+ m_EditorClassIdentifier:
@@ -0,0 +1,96 @@
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!1 &975678129233418977
4
+ GameObject:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ serializedVersion: 6
10
+ m_Component:
11
+ - component: {fileID: 7735793393820318980}
12
+ - component: {fileID: 5898651335449289899}
13
+ - component: {fileID: 3226358049917684236}
14
+ - component: {fileID: 6574686447719444045}
15
+ m_Layer: 5
16
+ m_Name: Rounded Cutout
17
+ m_TagString: Untagged
18
+ m_Icon: {fileID: 0}
19
+ m_NavMeshLayer: 0
20
+ m_StaticEditorFlags: 0
21
+ m_IsActive: 1
22
+ --- !u!224 &7735793393820318980
23
+ RectTransform:
24
+ m_ObjectHideFlags: 0
25
+ m_CorrespondingSourceObject: {fileID: 0}
26
+ m_PrefabInstance: {fileID: 0}
27
+ m_PrefabAsset: {fileID: 0}
28
+ m_GameObject: {fileID: 975678129233418977}
29
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
30
+ m_LocalPosition: {x: 0, y: 0, z: 0}
31
+ m_LocalScale: {x: 1, y: 1, z: 1}
32
+ m_ConstrainProportionsScale: 0
33
+ m_Children: []
34
+ m_Father: {fileID: 0}
35
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
36
+ m_AnchorMin: {x: 0, y: 1}
37
+ m_AnchorMax: {x: 1, y: 1}
38
+ m_AnchoredPosition: {x: 0, y: -93.5871}
39
+ m_SizeDelta: {x: 0, y: 187.1742}
40
+ m_Pivot: {x: 0.5, y: 0.5}
41
+ --- !u!222 &5898651335449289899
42
+ CanvasRenderer:
43
+ m_ObjectHideFlags: 0
44
+ m_CorrespondingSourceObject: {fileID: 0}
45
+ m_PrefabInstance: {fileID: 0}
46
+ m_PrefabAsset: {fileID: 0}
47
+ m_GameObject: {fileID: 975678129233418977}
48
+ m_CullTransparentMesh: 1
49
+ --- !u!114 &3226358049917684236
50
+ MonoBehaviour:
51
+ m_ObjectHideFlags: 0
52
+ m_CorrespondingSourceObject: {fileID: 0}
53
+ m_PrefabInstance: {fileID: 0}
54
+ m_PrefabAsset: {fileID: 0}
55
+ m_GameObject: {fileID: 975678129233418977}
56
+ m_Enabled: 1
57
+ m_EditorHideFlags: 0
58
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
59
+ m_Name:
60
+ m_EditorClassIdentifier:
61
+ m_Material: {fileID: 0}
62
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
63
+ m_RaycastTarget: 1
64
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
65
+ m_Maskable: 1
66
+ m_OnCullStateChanged:
67
+ m_PersistentCalls:
68
+ m_Calls: []
69
+ m_Sprite: {fileID: 0}
70
+ m_Type: 0
71
+ m_PreserveAspect: 0
72
+ m_FillCenter: 1
73
+ m_FillMethod: 4
74
+ m_FillAmount: 1
75
+ m_FillClockwise: 1
76
+ m_FillOrigin: 0
77
+ m_UseSpriteMesh: 0
78
+ m_PixelsPerUnitMultiplier: 1
79
+ --- !u!114 &6574686447719444045
80
+ MonoBehaviour:
81
+ m_ObjectHideFlags: 0
82
+ m_CorrespondingSourceObject: {fileID: 0}
83
+ m_PrefabInstance: {fileID: 0}
84
+ m_PrefabAsset: {fileID: 0}
85
+ m_GameObject: {fileID: 975678129233418977}
86
+ m_Enabled: 1
87
+ m_EditorHideFlags: 0
88
+ m_Script: {fileID: 11500000, guid: d8d6fbd710f94d5ab0779c13789d66d7, type: 3}
89
+ m_Name:
90
+ m_EditorClassIdentifier:
91
+ sideInset: 0
92
+ cutoutHeight: 55
93
+ cornerRadius: 75
94
+ aaSoftness: 1
95
+ transparentCutout: 1
96
+ cutoutColor: {r: 1, g: 0, b: 0, a: 1}
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 0e545819b3885594c9778fcc906c58ce
3
+ PrefabImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -34,8 +34,8 @@ RectTransform:
34
34
  m_LocalEulerAnglesHint: {x: 0, y: -0, z: -0}
35
35
  m_AnchorMin: {x: 0, y: 1}
36
36
  m_AnchorMax: {x: 1, y: 1}
37
- m_AnchoredPosition: {x: 0, y: -150}
38
- m_SizeDelta: {x: 0, y: 150}
37
+ m_AnchoredPosition: {x: 0, y: -163.909}
38
+ m_SizeDelta: {x: 0, y: 163.909}
39
39
  m_Pivot: {x: 0.5, y: 0}
40
40
  --- !u!114 &768694916858949612
41
41
  MonoBehaviour:
@@ -225,6 +225,7 @@ GameObject:
225
225
  - component: {fileID: 4258396565476554788}
226
226
  - component: {fileID: 4077741713236914486}
227
227
  - component: {fileID: 4812839430072998803}
228
+ - component: {fileID: 8767445059493422347}
228
229
  m_Layer: 5
229
230
  m_Name: Status Bar
230
231
  m_TagString: Untagged
@@ -280,8 +281,8 @@ MonoBehaviour:
280
281
  m_OnCullStateChanged:
281
282
  m_PersistentCalls:
282
283
  m_Calls: []
283
- m_Sprite: {fileID: 21300000, guid: 72b18270f6563fe49bb2d813995c0969, type: 3}
284
- m_Type: 1
284
+ m_Sprite: {fileID: 0}
285
+ m_Type: 0
285
286
  m_PreserveAspect: 0
286
287
  m_FillCenter: 1
287
288
  m_FillMethod: 4
@@ -290,6 +291,22 @@ MonoBehaviour:
290
291
  m_FillOrigin: 0
291
292
  m_UseSpriteMesh: 0
292
293
  m_PixelsPerUnitMultiplier: 2.245
294
+ --- !u!114 &8767445059493422347
295
+ MonoBehaviour:
296
+ m_ObjectHideFlags: 0
297
+ m_CorrespondingSourceObject: {fileID: 0}
298
+ m_PrefabInstance: {fileID: 0}
299
+ m_PrefabAsset: {fileID: 0}
300
+ m_GameObject: {fileID: 3686714507548732898}
301
+ m_Enabled: 1
302
+ m_EditorHideFlags: 0
303
+ m_Script: {fileID: 11500000, guid: d8d6fbd710f94d5ab0779c13789d66d7, type: 3}
304
+ m_Name:
305
+ m_EditorClassIdentifier:
306
+ sideInset: 0
307
+ cutoutHeight: 55
308
+ cornerRadius: 75
309
+ aaSoftness: 1
293
310
  --- !u!1 &5659532641892873429
294
311
  GameObject:
295
312
  m_ObjectHideFlags: 0
@@ -326,7 +343,7 @@ RectTransform:
326
343
  m_AnchorMin: {x: 0, y: 1}
327
344
  m_AnchorMax: {x: 0, y: 1}
328
345
  m_AnchoredPosition: {x: 214.145, y: -10.5}
329
- m_SizeDelta: {x: 285.29, y: 0}
346
+ m_SizeDelta: {x: 0, y: 0}
330
347
  m_Pivot: {x: 0.5, y: 0.5}
331
348
  --- !u!222 &8979309464556769080
332
349
  CanvasRenderer:
@@ -49,8 +49,8 @@ namespace Hyper
49
49
  public static HyperRandomStream GetContext([CallerFilePath] string filePath = "",
50
50
  [CallerMemberName] string memberName = "")
51
51
  {
52
- string className = System.IO.Path.GetFileNameWithoutExtension(filePath);
53
- string contextName = $"{className}.{memberName}";
52
+ string fileIdentifier = GetCallerFileIdentifier(filePath);
53
+ string contextName = $"{fileIdentifier}.{memberName}";
54
54
  return GetOrCreateContextRNG(contextName);
55
55
  }
56
56
 
@@ -60,8 +60,8 @@ namespace Hyper
60
60
  /// </summary>
61
61
  public static HyperRandomStream GetShared([CallerFilePath] string filePath = "")
62
62
  {
63
- string className = System.IO.Path.GetFileNameWithoutExtension(filePath);
64
- return GetOrCreateContextRNG(className);
63
+ string fileIdentifier = GetCallerFileIdentifier(filePath);
64
+ return GetOrCreateContextRNG(fileIdentifier);
65
65
  }
66
66
 
67
67
  /// <summary>
@@ -138,6 +138,26 @@ namespace Hyper
138
138
  }
139
139
  }
140
140
 
141
+ private static string GetCallerFileIdentifier(string filePath)
142
+ {
143
+ #if UNITY_EDITOR
144
+ // A WebGL player treats the backslashes embedded in a Windows
145
+ // CallerFilePath as ordinary characters, so Path returns the full
146
+ // path without its extension. Reproduce that established behavior
147
+ // in the Editor without changing the player implementation.
148
+ string webGLFilePath = (filePath ?? string.Empty).Replace('/', '\\');
149
+ if (webGLFilePath.EndsWith(".cs", StringComparison.OrdinalIgnoreCase))
150
+ {
151
+ webGLFilePath = webGLFilePath.Substring(0, webGLFilePath.Length - 3);
152
+ }
153
+ return webGLFilePath;
154
+ #else
155
+ // Compatibility locked: this is the path handling currently used
156
+ // by live WebGL players and must remain unchanged.
157
+ return System.IO.Path.GetFileNameWithoutExtension(filePath);
158
+ #endif
159
+ }
160
+
141
161
  private static int CalculateWebGLSafeSeed(string identifier)
142
162
  {
143
163
  unchecked
@@ -508,4 +528,4 @@ namespace Hyper
508
528
  return list.OrderBy(keySelector).ToList();
509
529
  }
510
530
  }
511
- }
531
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app.hypergames.hypersdk",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
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",
@@ -29,8 +29,7 @@
29
29
  "documentationUrl": "https://docs-getting-started-updates.hyper-sdk-documentation.pages.dev/",
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "https://github.com/mvmhyper/hyper-sdk.git",
33
- "revision": "v0.1.0"
32
+ "url": "https://github.com/mvmhyper/hyper-sdk.git"
34
33
  },
35
34
  "dependencies": {
36
35
  "com.unity.nuget.newtonsoft-json": "3.2.1"
@@ -1,169 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 72b18270f6563fe49bb2d813995c0969
3
- TextureImporter:
4
- internalIDToNameTable:
5
- - first:
6
- 213: 7083267529726472846
7
- second: Top_Black_Rounded_Bar_Portrait_IV_0
8
- externalObjects: {}
9
- serializedVersion: 13
10
- mipmaps:
11
- mipMapMode: 0
12
- enableMipMap: 0
13
- sRGBTexture: 1
14
- linearTexture: 0
15
- fadeOut: 0
16
- borderMipMap: 0
17
- mipMapsPreserveCoverage: 0
18
- alphaTestReferenceValue: 0.5
19
- mipMapFadeDistanceStart: 1
20
- mipMapFadeDistanceEnd: 3
21
- bumpmap:
22
- convertToNormalMap: 0
23
- externalNormalMap: 0
24
- heightScale: 0.25
25
- normalMapFilter: 0
26
- flipGreenChannel: 0
27
- isReadable: 0
28
- streamingMipmaps: 0
29
- streamingMipmapsPriority: 0
30
- vTOnly: 0
31
- ignoreMipmapLimit: 0
32
- grayScaleToAlpha: 0
33
- generateCubemap: 6
34
- cubemapConvolution: 0
35
- seamlessCubemap: 0
36
- textureFormat: 1
37
- maxTextureSize: 2048
38
- textureSettings:
39
- serializedVersion: 2
40
- filterMode: 1
41
- aniso: 1
42
- mipBias: 0
43
- wrapU: 1
44
- wrapV: 1
45
- wrapW: 1
46
- nPOTScale: 0
47
- lightmap: 0
48
- compressionQuality: 50
49
- spriteMode: 1
50
- spriteExtrude: 1
51
- spriteMeshType: 1
52
- alignment: 0
53
- spritePivot: {x: 0.5, y: 0.5}
54
- spritePixelsToUnits: 100
55
- spriteBorder: {x: 99, y: 112, z: 99, w: 0}
56
- spriteGenerateFallbackPhysicsShape: 0
57
- alphaUsage: 1
58
- alphaIsTransparency: 1
59
- spriteTessellationDetail: -1
60
- textureType: 8
61
- textureShape: 1
62
- singleChannelComponent: 0
63
- flipbookRows: 1
64
- flipbookColumns: 1
65
- maxTextureSizeSet: 0
66
- compressionQualitySet: 0
67
- textureFormatSet: 0
68
- ignorePngGamma: 0
69
- applyGammaDecoding: 0
70
- swizzle: 50462976
71
- cookieLightType: 0
72
- platformSettings:
73
- - serializedVersion: 4
74
- buildTarget: DefaultTexturePlatform
75
- maxTextureSize: 2048
76
- resizeAlgorithm: 0
77
- textureFormat: -1
78
- textureCompression: 1
79
- compressionQuality: 100
80
- crunchedCompression: 1
81
- allowsAlphaSplitting: 0
82
- overridden: 0
83
- ignorePlatformSupport: 0
84
- androidETC2FallbackOverride: 0
85
- forceMaximumCompressionQuality_BC6H_BC7: 0
86
- - serializedVersion: 4
87
- buildTarget: Standalone
88
- maxTextureSize: 2048
89
- resizeAlgorithm: 0
90
- textureFormat: -1
91
- textureCompression: 1
92
- compressionQuality: 50
93
- crunchedCompression: 0
94
- allowsAlphaSplitting: 0
95
- overridden: 0
96
- ignorePlatformSupport: 0
97
- androidETC2FallbackOverride: 0
98
- forceMaximumCompressionQuality_BC6H_BC7: 0
99
- - serializedVersion: 4
100
- buildTarget: Android
101
- maxTextureSize: 2048
102
- resizeAlgorithm: 0
103
- textureFormat: -1
104
- textureCompression: 1
105
- compressionQuality: 50
106
- crunchedCompression: 0
107
- allowsAlphaSplitting: 0
108
- overridden: 0
109
- ignorePlatformSupport: 0
110
- androidETC2FallbackOverride: 0
111
- forceMaximumCompressionQuality_BC6H_BC7: 0
112
- - serializedVersion: 4
113
- buildTarget: WebGL
114
- maxTextureSize: 2048
115
- resizeAlgorithm: 0
116
- textureFormat: -1
117
- textureCompression: 1
118
- compressionQuality: 50
119
- crunchedCompression: 0
120
- allowsAlphaSplitting: 0
121
- overridden: 0
122
- ignorePlatformSupport: 0
123
- androidETC2FallbackOverride: 0
124
- forceMaximumCompressionQuality_BC6H_BC7: 0
125
- spriteSheet:
126
- serializedVersion: 2
127
- sprites:
128
- - serializedVersion: 2
129
- name: Top_Black_Rounded_Bar_Portrait_IV_0
130
- rect:
131
- serializedVersion: 2
132
- x: 0
133
- y: 3
134
- width: 1496
135
- height: 445
136
- alignment: 0
137
- pivot: {x: 0.5, y: 0.5}
138
- border: {x: 0, y: 0, z: 0, w: 0}
139
- customData:
140
- outline: []
141
- physicsShape: []
142
- tessellationDetail: -1
143
- bones: []
144
- spriteID: e82b76e1a42dc4260800000000000000
145
- internalID: 7083267529726472846
146
- vertices: []
147
- indices:
148
- edges: []
149
- weights: []
150
- outline: []
151
- customData:
152
- physicsShape: []
153
- bones: []
154
- spriteID: 5e97eb03825dee720800000000000000
155
- internalID: 1537655665
156
- vertices: []
157
- indices:
158
- edges: []
159
- weights: []
160
- secondaryTextures: []
161
- spriteCustomMetadata:
162
- entries: []
163
- nameFileIdTable:
164
- Top_Black_Rounded_Bar_Portrait_IV_0: 7083267529726472846
165
- mipmapLimitGroupName:
166
- pSDRemoveMatte: 0
167
- userData:
168
- assetBundleName:
169
- assetBundleVariant: