app.hypergames.hypersdk 1.11.0-beta.2 → 1.11.0-beta.21
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 +146 -0
- package/Editor/Scripts/Inspectors/HyperSDKSettingsEditor.cs +6 -0
- package/HyperLoader.unity +2 -2
- package/Runtime/Internal/Core/HyperRuntime.cs +104 -9
- package/Runtime/Internal/Managers/DataManager.cs +2 -1
- package/Runtime/Internal/Managers/EventManager.cs +7 -1
- package/Runtime/Internal/Managers/GameManager.cs +88 -51
- package/Runtime/Internal/Managers/ReplayManager.cs +5 -1
- package/Runtime/Internal/Managers/TimeManager.cs +25 -8
- package/Runtime/Internal/Replay/ReplaySessionState.cs +66 -6
- package/Runtime/Internal/ScriptableObjects/HyperSDKSettings.cs +4 -0
- package/Runtime/Internal/UI/Components/ReplayController.cs +134 -11
- package/Runtime/Internal/UI/Components/ReplaySeekOverlay.cs +18 -0
- package/Runtime/Internal/UI/Components/ReplaySeekOverlay.cs.meta +2 -0
- package/Runtime/Internal/UI/Modals/ReplayPausedModal.cs +145 -0
- package/Runtime/Internal/UI/Modals/ReplayPausedModal.cs.meta +2 -0
- package/Runtime/Internal/UI/Modals/StartingInstructionModal.cs +1 -0
- package/Runtime/Public/Core/HyperSDK.cs +16 -0
- package/Runtime/Public/Replay/ReplayPlaybackEngine.cs +127 -3
- package/Runtime/Resources/Fonts/Nunito/Nunito-Bold SDF.asset +500 -457
- package/Runtime/Resources/Fonts/Wonder Boys/Wonder Boys.asset +394 -379
- package/Runtime/Resources/HyperSDKSettings.asset +1 -0
- package/Runtime/Resources/Sprites/Buttons/Hyper Long White Button_Normal.png +0 -0
- package/Runtime/Resources/Sprites/Buttons/Hyper Long White Button_Normal.png.meta +156 -0
- package/Runtime/Resources/Sprites/Buttons/Hyper Long White Button_Pressed.png +0 -0
- package/Runtime/Resources/Sprites/Buttons/Hyper Long White Button_Pressed.png.meta +156 -0
- package/Runtime/Resources/Sprites/Circle Loader/Property 1=1.png.meta +7 -7
- package/Runtime/Resources/Sprites/Circle Loader/Property 1=2.png.meta +7 -7
- package/Runtime/Resources/Sprites/Circle Loader/Property 1=3.png.meta +7 -7
- package/Runtime/Resources/Sprites/Circle Loader/Property 1=4.png.meta +7 -7
- package/Runtime/Resources/Sprites/Circle Loader/Property 1=5.png.meta +7 -7
- package/Runtime/Resources/Sprites/Replays/Replay.png +0 -0
- package/Runtime/Resources/Sprites/Replays/{Recording.png.meta → Replay.png.meta} +9 -9
- package/Runtime/Resources/UIPrefabs/ControlBar.prefab +5 -5
- package/Runtime/Resources/UIPrefabs/ReplayController.prefab +305 -183
- package/Runtime/Resources/UIPrefabs/ReplayPausedModal.prefab +2194 -0
- package/Runtime/Resources/UIPrefabs/ReplayPausedModal.prefab.meta +7 -0
- package/Runtime/Resources/UIPrefabs/ReplaySeekOverlay.prefab +291 -6
- package/Runtime/Shared/Replay/IReplayPlaybackEngine.cs +3 -0
- package/Samples~/LaneRunner/LaneRunnerSample.unity +4 -3
- package/Samples~/LaneRunner/Prefabs/DoubleScorePickup.prefab +1 -1
- package/Samples~/LaneRunner/Prefabs/Obstacle.prefab +1 -1
- package/Samples~/LaneRunner/README.md +8 -1
- package/Samples~/LaneRunner/Scripts/Gameplay/LaneRunnerPlayer.cs +18 -4
- package/Samples~/LaneRunner/Scripts/Gameplay/LaneRunnerSpawner.cs +3 -1
- package/Samples~/LaneRunner/Scripts/Hyper/LaneRunnerTournamentAdapter.cs +8 -0
- package/package.json +1 -1
- package/Runtime/Resources/Sprites/Replays/Recording.png +0 -0
|
@@ -1,5 +1,141 @@
|
|
|
1
1
|
%YAML 1.1
|
|
2
2
|
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
+
--- !u!1 &3756953479054386925
|
|
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: 779641985203276099}
|
|
12
|
+
- component: {fileID: 1406115575588395321}
|
|
13
|
+
- component: {fileID: 222284159583480}
|
|
14
|
+
m_Layer: 5
|
|
15
|
+
m_Name: Progress Text
|
|
16
|
+
m_TagString: Untagged
|
|
17
|
+
m_Icon: {fileID: 0}
|
|
18
|
+
m_NavMeshLayer: 0
|
|
19
|
+
m_StaticEditorFlags: 2147483647
|
|
20
|
+
m_IsActive: 1
|
|
21
|
+
--- !u!224 &779641985203276099
|
|
22
|
+
RectTransform:
|
|
23
|
+
m_ObjectHideFlags: 0
|
|
24
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
25
|
+
m_PrefabInstance: {fileID: 0}
|
|
26
|
+
m_PrefabAsset: {fileID: 0}
|
|
27
|
+
m_GameObject: {fileID: 3756953479054386925}
|
|
28
|
+
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
29
|
+
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
30
|
+
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
31
|
+
m_ConstrainProportionsScale: 0
|
|
32
|
+
m_Children: []
|
|
33
|
+
m_Father: {fileID: 4964265687690206228}
|
|
34
|
+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
35
|
+
m_AnchorMin: {x: 0, y: 0}
|
|
36
|
+
m_AnchorMax: {x: 1, y: 1}
|
|
37
|
+
m_AnchoredPosition: {x: 0, y: 0}
|
|
38
|
+
m_SizeDelta: {x: 0, y: 0}
|
|
39
|
+
m_Pivot: {x: 0.5, y: 0.5}
|
|
40
|
+
--- !u!222 &1406115575588395321
|
|
41
|
+
CanvasRenderer:
|
|
42
|
+
m_ObjectHideFlags: 0
|
|
43
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
44
|
+
m_PrefabInstance: {fileID: 0}
|
|
45
|
+
m_PrefabAsset: {fileID: 0}
|
|
46
|
+
m_GameObject: {fileID: 3756953479054386925}
|
|
47
|
+
m_CullTransparentMesh: 1
|
|
48
|
+
--- !u!114 &222284159583480
|
|
49
|
+
MonoBehaviour:
|
|
50
|
+
m_ObjectHideFlags: 0
|
|
51
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
52
|
+
m_PrefabInstance: {fileID: 0}
|
|
53
|
+
m_PrefabAsset: {fileID: 0}
|
|
54
|
+
m_GameObject: {fileID: 3756953479054386925}
|
|
55
|
+
m_Enabled: 1
|
|
56
|
+
m_EditorHideFlags: 0
|
|
57
|
+
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
|
58
|
+
m_Name:
|
|
59
|
+
m_EditorClassIdentifier:
|
|
60
|
+
m_Material: {fileID: 0}
|
|
61
|
+
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
62
|
+
m_RaycastTarget: 1
|
|
63
|
+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
64
|
+
m_Maskable: 1
|
|
65
|
+
m_OnCullStateChanged:
|
|
66
|
+
m_PersistentCalls:
|
|
67
|
+
m_Calls: []
|
|
68
|
+
m_text: 10%
|
|
69
|
+
m_isRightToLeft: 0
|
|
70
|
+
m_fontAsset: {fileID: 11400000, guid: 39c484b4a22288c488625a88b6da2145, type: 2}
|
|
71
|
+
m_sharedMaterial: {fileID: -8342687123090027242, guid: 39c484b4a22288c488625a88b6da2145, type: 2}
|
|
72
|
+
m_fontSharedMaterials: []
|
|
73
|
+
m_fontMaterial: {fileID: 0}
|
|
74
|
+
m_fontMaterials: []
|
|
75
|
+
m_fontColor32:
|
|
76
|
+
serializedVersion: 2
|
|
77
|
+
rgba: 4294967295
|
|
78
|
+
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
|
79
|
+
m_enableVertexGradient: 0
|
|
80
|
+
m_colorMode: 3
|
|
81
|
+
m_fontColorGradient:
|
|
82
|
+
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
|
83
|
+
topRight: {r: 1, g: 1, b: 1, a: 1}
|
|
84
|
+
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
|
85
|
+
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
|
86
|
+
m_fontColorGradientPreset: {fileID: 0}
|
|
87
|
+
m_spriteAsset: {fileID: 0}
|
|
88
|
+
m_tintAllSprites: 0
|
|
89
|
+
m_StyleSheet: {fileID: 0}
|
|
90
|
+
m_TextStyleHashCode: -1183493901
|
|
91
|
+
m_overrideHtmlColors: 0
|
|
92
|
+
m_faceColor:
|
|
93
|
+
serializedVersion: 2
|
|
94
|
+
rgba: 4294967295
|
|
95
|
+
m_fontSize: 45
|
|
96
|
+
m_fontSizeBase: 45
|
|
97
|
+
m_fontWeight: 400
|
|
98
|
+
m_enableAutoSizing: 0
|
|
99
|
+
m_fontSizeMin: 18
|
|
100
|
+
m_fontSizeMax: 25
|
|
101
|
+
m_fontStyle: 0
|
|
102
|
+
m_HorizontalAlignment: 2
|
|
103
|
+
m_VerticalAlignment: 512
|
|
104
|
+
m_textAlignment: 65535
|
|
105
|
+
m_characterSpacing: 0
|
|
106
|
+
m_wordSpacing: 0
|
|
107
|
+
m_lineSpacing: 0
|
|
108
|
+
m_lineSpacingMax: 0
|
|
109
|
+
m_paragraphSpacing: 0
|
|
110
|
+
m_charWidthMaxAdj: 0
|
|
111
|
+
m_TextWrappingMode: 1
|
|
112
|
+
m_wordWrappingRatios: 0.4
|
|
113
|
+
m_overflowMode: 0
|
|
114
|
+
m_linkedTextComponent: {fileID: 0}
|
|
115
|
+
parentLinkedComponent: {fileID: 0}
|
|
116
|
+
m_enableKerning: 1
|
|
117
|
+
m_ActiveFontFeatures: 6e72656b
|
|
118
|
+
m_enableExtraPadding: 0
|
|
119
|
+
checkPaddingRequired: 0
|
|
120
|
+
m_isRichText: 1
|
|
121
|
+
m_EmojiFallbackSupport: 1
|
|
122
|
+
m_parseCtrlCharacters: 1
|
|
123
|
+
m_isOrthographic: 1
|
|
124
|
+
m_isCullingEnabled: 0
|
|
125
|
+
m_horizontalMapping: 0
|
|
126
|
+
m_verticalMapping: 0
|
|
127
|
+
m_uvLineOffset: 0
|
|
128
|
+
m_geometrySortingOrder: 0
|
|
129
|
+
m_IsTextObjectScaleStatic: 0
|
|
130
|
+
m_VertexBufferAutoSizeReduction: 0
|
|
131
|
+
m_useMaxVisibleDescender: 1
|
|
132
|
+
m_pageToDisplay: 1
|
|
133
|
+
m_margin: {x: 0, y: 4.9364014, z: 0, w: 0}
|
|
134
|
+
m_isUsingLegacyAnimationComponent: 0
|
|
135
|
+
m_isVolumetricText: 0
|
|
136
|
+
m_hasFontAssetChanged: 0
|
|
137
|
+
m_baseMaterial: {fileID: 0}
|
|
138
|
+
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
|
3
139
|
--- !u!1 &7194081263312604041
|
|
4
140
|
GameObject:
|
|
5
141
|
m_ObjectHideFlags: 0
|
|
@@ -11,6 +147,7 @@ GameObject:
|
|
|
11
147
|
- component: {fileID: 7194081263312604042}
|
|
12
148
|
- component: {fileID: 7194081263312604043}
|
|
13
149
|
- component: {fileID: 7194081263312604044}
|
|
150
|
+
- component: {fileID: 7194081263312604045}
|
|
14
151
|
m_Layer: 5
|
|
15
152
|
m_Name: ReplaySeekOverlay
|
|
16
153
|
m_TagString: Untagged
|
|
@@ -30,6 +167,7 @@ RectTransform:
|
|
|
30
167
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
31
168
|
m_ConstrainProportionsScale: 0
|
|
32
169
|
m_Children:
|
|
170
|
+
- {fileID: 4964265687690206228}
|
|
33
171
|
- {fileID: 1405550522960570861}
|
|
34
172
|
m_Father: {fileID: 0}
|
|
35
173
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
@@ -56,8 +194,8 @@ MonoBehaviour:
|
|
|
56
194
|
m_Enabled: 1
|
|
57
195
|
m_EditorHideFlags: 0
|
|
58
196
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
59
|
-
m_Name:
|
|
60
|
-
m_EditorClassIdentifier:
|
|
197
|
+
m_Name:
|
|
198
|
+
m_EditorClassIdentifier:
|
|
61
199
|
m_Material: {fileID: 0}
|
|
62
200
|
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
|
63
201
|
m_RaycastTarget: 1
|
|
@@ -76,6 +214,153 @@ MonoBehaviour:
|
|
|
76
214
|
m_FillOrigin: 0
|
|
77
215
|
m_UseSpriteMesh: 0
|
|
78
216
|
m_PixelsPerUnitMultiplier: 1
|
|
217
|
+
--- !u!114 &7194081263312604045
|
|
218
|
+
MonoBehaviour:
|
|
219
|
+
m_ObjectHideFlags: 0
|
|
220
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
221
|
+
m_PrefabInstance: {fileID: 0}
|
|
222
|
+
m_PrefabAsset: {fileID: 0}
|
|
223
|
+
m_GameObject: {fileID: 7194081263312604041}
|
|
224
|
+
m_Enabled: 1
|
|
225
|
+
m_EditorHideFlags: 0
|
|
226
|
+
m_Script: {fileID: 11500000, guid: a7d0eb352f3c4d64a687b8c4509e1fa2, type: 3}
|
|
227
|
+
m_Name:
|
|
228
|
+
m_EditorClassIdentifier:
|
|
229
|
+
progressText: {fileID: 222284159583480}
|
|
230
|
+
--- !u!1 &7203143992681750043
|
|
231
|
+
GameObject:
|
|
232
|
+
m_ObjectHideFlags: 0
|
|
233
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
234
|
+
m_PrefabInstance: {fileID: 0}
|
|
235
|
+
m_PrefabAsset: {fileID: 0}
|
|
236
|
+
serializedVersion: 6
|
|
237
|
+
m_Component:
|
|
238
|
+
- component: {fileID: 4964265687690206228}
|
|
239
|
+
- component: {fileID: 244847084908241233}
|
|
240
|
+
- component: {fileID: 58764656020334038}
|
|
241
|
+
- component: {fileID: 198707894963846823}
|
|
242
|
+
- component: {fileID: 1406736931558126202}
|
|
243
|
+
m_Layer: 0
|
|
244
|
+
m_Name: Progress
|
|
245
|
+
m_TagString: Untagged
|
|
246
|
+
m_Icon: {fileID: 0}
|
|
247
|
+
m_NavMeshLayer: 0
|
|
248
|
+
m_StaticEditorFlags: 0
|
|
249
|
+
m_IsActive: 1
|
|
250
|
+
--- !u!224 &4964265687690206228
|
|
251
|
+
RectTransform:
|
|
252
|
+
m_ObjectHideFlags: 0
|
|
253
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
254
|
+
m_PrefabInstance: {fileID: 0}
|
|
255
|
+
m_PrefabAsset: {fileID: 0}
|
|
256
|
+
m_GameObject: {fileID: 7203143992681750043}
|
|
257
|
+
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
258
|
+
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
259
|
+
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
260
|
+
m_ConstrainProportionsScale: 0
|
|
261
|
+
m_Children:
|
|
262
|
+
- {fileID: 779641985203276099}
|
|
263
|
+
m_Father: {fileID: 7194081263312604042}
|
|
264
|
+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
265
|
+
m_AnchorMin: {x: 0.5, y: 0.5}
|
|
266
|
+
m_AnchorMax: {x: 0.5, y: 0.5}
|
|
267
|
+
m_AnchoredPosition: {x: 0.00000014901161, y: -102.31126}
|
|
268
|
+
m_SizeDelta: {x: 133.7914, y: 62.2408}
|
|
269
|
+
m_Pivot: {x: 0.5, y: 0.5}
|
|
270
|
+
--- !u!222 &244847084908241233
|
|
271
|
+
CanvasRenderer:
|
|
272
|
+
m_ObjectHideFlags: 0
|
|
273
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
274
|
+
m_PrefabInstance: {fileID: 0}
|
|
275
|
+
m_PrefabAsset: {fileID: 0}
|
|
276
|
+
m_GameObject: {fileID: 7203143992681750043}
|
|
277
|
+
m_CullTransparentMesh: 1
|
|
278
|
+
--- !u!114 &58764656020334038
|
|
279
|
+
MonoBehaviour:
|
|
280
|
+
m_ObjectHideFlags: 0
|
|
281
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
282
|
+
m_PrefabInstance: {fileID: 0}
|
|
283
|
+
m_PrefabAsset: {fileID: 0}
|
|
284
|
+
m_GameObject: {fileID: 7203143992681750043}
|
|
285
|
+
m_Enabled: 1
|
|
286
|
+
m_EditorHideFlags: 0
|
|
287
|
+
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
288
|
+
m_Name:
|
|
289
|
+
m_EditorClassIdentifier:
|
|
290
|
+
m_Material: {fileID: 0}
|
|
291
|
+
m_Color: {r: 1, g: 1, b: 1, a: 0.1764706}
|
|
292
|
+
m_RaycastTarget: 1
|
|
293
|
+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
294
|
+
m_Maskable: 1
|
|
295
|
+
m_OnCullStateChanged:
|
|
296
|
+
m_PersistentCalls:
|
|
297
|
+
m_Calls: []
|
|
298
|
+
m_Sprite: {fileID: 21300000, guid: d4a5f19153a849545b47d5529cc26418, type: 3}
|
|
299
|
+
m_Type: 1
|
|
300
|
+
m_PreserveAspect: 0
|
|
301
|
+
m_FillCenter: 1
|
|
302
|
+
m_FillMethod: 4
|
|
303
|
+
m_FillAmount: 1
|
|
304
|
+
m_FillClockwise: 1
|
|
305
|
+
m_FillOrigin: 0
|
|
306
|
+
m_UseSpriteMesh: 0
|
|
307
|
+
m_PixelsPerUnitMultiplier: 4.45
|
|
308
|
+
--- !u!114 &198707894963846823
|
|
309
|
+
MonoBehaviour:
|
|
310
|
+
m_ObjectHideFlags: 0
|
|
311
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
312
|
+
m_PrefabInstance: {fileID: 0}
|
|
313
|
+
m_PrefabAsset: {fileID: 0}
|
|
314
|
+
m_GameObject: {fileID: 7203143992681750043}
|
|
315
|
+
m_Enabled: 1
|
|
316
|
+
m_EditorHideFlags: 0
|
|
317
|
+
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
|
318
|
+
m_Name:
|
|
319
|
+
m_EditorClassIdentifier:
|
|
320
|
+
m_Navigation:
|
|
321
|
+
m_Mode: 3
|
|
322
|
+
m_WrapAround: 0
|
|
323
|
+
m_SelectOnUp: {fileID: 0}
|
|
324
|
+
m_SelectOnDown: {fileID: 0}
|
|
325
|
+
m_SelectOnLeft: {fileID: 0}
|
|
326
|
+
m_SelectOnRight: {fileID: 0}
|
|
327
|
+
m_Transition: 1
|
|
328
|
+
m_Colors:
|
|
329
|
+
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
|
330
|
+
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
|
331
|
+
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
|
332
|
+
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
|
333
|
+
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
|
334
|
+
m_ColorMultiplier: 1
|
|
335
|
+
m_FadeDuration: 0.1
|
|
336
|
+
m_SpriteState:
|
|
337
|
+
m_HighlightedSprite: {fileID: 0}
|
|
338
|
+
m_PressedSprite: {fileID: 0}
|
|
339
|
+
m_SelectedSprite: {fileID: 0}
|
|
340
|
+
m_DisabledSprite: {fileID: 0}
|
|
341
|
+
m_AnimationTriggers:
|
|
342
|
+
m_NormalTrigger: Normal
|
|
343
|
+
m_HighlightedTrigger: Highlighted
|
|
344
|
+
m_PressedTrigger: Pressed
|
|
345
|
+
m_SelectedTrigger: Selected
|
|
346
|
+
m_DisabledTrigger: Disabled
|
|
347
|
+
m_Interactable: 1
|
|
348
|
+
m_TargetGraphic: {fileID: 58764656020334038}
|
|
349
|
+
m_OnClick:
|
|
350
|
+
m_PersistentCalls:
|
|
351
|
+
m_Calls: []
|
|
352
|
+
--- !u!225 &1406736931558126202
|
|
353
|
+
CanvasGroup:
|
|
354
|
+
m_ObjectHideFlags: 0
|
|
355
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
356
|
+
m_PrefabInstance: {fileID: 0}
|
|
357
|
+
m_PrefabAsset: {fileID: 0}
|
|
358
|
+
m_GameObject: {fileID: 7203143992681750043}
|
|
359
|
+
m_Enabled: 1
|
|
360
|
+
m_Alpha: 1
|
|
361
|
+
m_Interactable: 1
|
|
362
|
+
m_BlocksRaycasts: 1
|
|
363
|
+
m_IgnoreParentGroups: 0
|
|
79
364
|
--- !u!1 &8073796807547131747
|
|
80
365
|
GameObject:
|
|
81
366
|
m_ObjectHideFlags: 0
|
|
@@ -105,7 +390,7 @@ RectTransform:
|
|
|
105
390
|
m_GameObject: {fileID: 8073796807547131747}
|
|
106
391
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
107
392
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
108
|
-
m_LocalScale: {x:
|
|
393
|
+
m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
|
|
109
394
|
m_ConstrainProportionsScale: 1
|
|
110
395
|
m_Children: []
|
|
111
396
|
m_Father: {fileID: 7194081263312604042}
|
|
@@ -133,8 +418,8 @@ MonoBehaviour:
|
|
|
133
418
|
m_Enabled: 1
|
|
134
419
|
m_EditorHideFlags: 0
|
|
135
420
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
136
|
-
m_Name:
|
|
137
|
-
m_EditorClassIdentifier:
|
|
421
|
+
m_Name:
|
|
422
|
+
m_EditorClassIdentifier:
|
|
138
423
|
m_Material: {fileID: 0}
|
|
139
424
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
140
425
|
m_RaycastTarget: 1
|
|
@@ -170,7 +455,7 @@ Animator:
|
|
|
170
455
|
m_LinearVelocityBlending: 0
|
|
171
456
|
m_StabilizeFeet: 0
|
|
172
457
|
m_AnimatePhysics: 0
|
|
173
|
-
m_WarningMessage:
|
|
458
|
+
m_WarningMessage:
|
|
174
459
|
m_HasTransformHierarchy: 1
|
|
175
460
|
m_AllowConstantClipSamplingOptimization: 1
|
|
176
461
|
m_KeepAnimatorStateOnDisable: 0
|
|
@@ -19,12 +19,15 @@ namespace Hyper.Shared
|
|
|
19
19
|
event Action<float, string> OnValueAction;
|
|
20
20
|
event Action<string> OnActionPreparing;
|
|
21
21
|
event Action OnGameStarted;
|
|
22
|
+
event Action OnGameplayReady;
|
|
22
23
|
event Action OnGameEnded;
|
|
23
24
|
|
|
24
25
|
bool IsPlaying { get; }
|
|
25
26
|
double DurationSeconds { get; }
|
|
26
27
|
double ElapsedSeconds { get; }
|
|
27
28
|
float Progress01 { get; }
|
|
29
|
+
bool HasGameplayReadyMarker { get; }
|
|
30
|
+
float GameplayStartProgress01 { get; }
|
|
28
31
|
double ActionPreparationLeadSeconds { get; set; }
|
|
29
32
|
|
|
30
33
|
void Begin(string ndjson);
|
|
@@ -491,7 +491,8 @@ MonoBehaviour:
|
|
|
491
491
|
laneChangeSpeed: 14
|
|
492
492
|
jumpVelocity: 7.5
|
|
493
493
|
swipeThreshold: 45
|
|
494
|
-
startPosition: {x: 3.62, y: 0.
|
|
494
|
+
startPosition: {x: 3.62, y: 0.5, z: 0}
|
|
495
|
+
groundHeight: 0.5
|
|
495
496
|
--- !u!54 &554141008
|
|
496
497
|
Rigidbody:
|
|
497
498
|
m_ObjectHideFlags: 0
|
|
@@ -574,7 +575,7 @@ BoxCollider:
|
|
|
574
575
|
m_Material: {fileID: 0}
|
|
575
576
|
m_IncludeLayers:
|
|
576
577
|
serializedVersion: 2
|
|
577
|
-
m_Bits:
|
|
578
|
+
m_Bits: 1
|
|
578
579
|
m_ExcludeLayers:
|
|
579
580
|
serializedVersion: 2
|
|
580
581
|
m_Bits: 0
|
|
@@ -1051,7 +1052,7 @@ BoxCollider:
|
|
|
1051
1052
|
m_Material: {fileID: 0}
|
|
1052
1053
|
m_IncludeLayers:
|
|
1053
1054
|
serializedVersion: 2
|
|
1054
|
-
m_Bits:
|
|
1055
|
+
m_Bits: 1
|
|
1055
1056
|
m_ExcludeLayers:
|
|
1056
1057
|
serializedVersion: 2
|
|
1057
1058
|
m_Bits: 0
|
|
@@ -13,13 +13,20 @@ deterministic spawning, a timed score multiplier, and replay integration.
|
|
|
13
13
|
Assign `LaneRunnerSample` as the Game and Practice scene in Hyper Game Content
|
|
14
14
|
Config, then use Hyper's Editor game-mode menu to run Practice, Battle, or Replay.
|
|
15
15
|
Battle sessions record to `hyper-replay.ndjson` in `Application.persistentDataPath`.
|
|
16
|
+
Enable Custom Restart Flow in Hyper SDK Settings to test in-place Watch Again and
|
|
17
|
+
replay seeking without reloading the scene.
|
|
18
|
+
|
|
19
|
+
The sample uses only Unity's built-in `Default` layer, `Untagged`, and
|
|
20
|
+
`MainCamera`. Its collider overrides and ground safety do not require changes to
|
|
21
|
+
the importing project's tags, layers, or physics collision matrix.
|
|
16
22
|
|
|
17
23
|
## Integration structure
|
|
18
24
|
|
|
19
25
|
- `LaneRunnerGame` owns rules, score, speed, and power-up state.
|
|
20
26
|
- `LaneRunnerPlayer` owns physical input and applies commands in `FixedUpdate`.
|
|
21
27
|
- `LaneRunnerSpawner` creates deterministic rows using `HyperRandom`.
|
|
22
|
-
- `LaneRunnerTournamentAdapter` connects score, power-ups,
|
|
28
|
+
- `LaneRunnerTournamentAdapter` connects score, power-ups, lifecycle, and custom
|
|
29
|
+
restart handling to HyperSDK.
|
|
23
30
|
- `LaneRunnerReplayAdapter` records accepted commands and injects replay commands
|
|
24
31
|
through the same player path.
|
|
25
32
|
|
|
@@ -11,7 +11,8 @@ namespace HyperSamples.LaneRunner
|
|
|
11
11
|
[SerializeField] private float laneChangeSpeed = 14f;
|
|
12
12
|
[SerializeField] private float jumpVelocity = 7.5f;
|
|
13
13
|
[SerializeField] private float swipeThreshold = 45f;
|
|
14
|
-
[SerializeField] private Vector3 startPosition = new Vector3(0f, 0.
|
|
14
|
+
[SerializeField] private Vector3 startPosition = new Vector3(0f, 0.5f, 0f);
|
|
15
|
+
[SerializeField] private float groundHeight = 0.5f;
|
|
15
16
|
|
|
16
17
|
public event Action<LaneRunnerCommand> CommandApplied;
|
|
17
18
|
|
|
@@ -48,18 +49,18 @@ namespace HyperSamples.LaneRunner
|
|
|
48
49
|
|
|
49
50
|
private void FixedUpdate()
|
|
50
51
|
{
|
|
52
|
+
StabilizeGround();
|
|
53
|
+
|
|
51
54
|
if (pendingLaneDelta != 0)
|
|
52
55
|
{
|
|
53
56
|
int nextLane = Mathf.Clamp(targetLane + pendingLaneDelta, -1, 1);
|
|
54
57
|
pendingLaneDelta = 0;
|
|
55
|
-
Debug.Log($"LaneRunnerPlayer: Moving from lane {targetLane} to {nextLane}");
|
|
56
58
|
if (nextLane != targetLane)
|
|
57
59
|
{
|
|
58
60
|
LaneRunnerCommand applied = nextLane < targetLane
|
|
59
61
|
? LaneRunnerCommand.MoveLeft
|
|
60
62
|
: LaneRunnerCommand.MoveRight;
|
|
61
63
|
targetLane = nextLane;
|
|
62
|
-
Debug.Log($"targetLane updated to {targetLane}");
|
|
63
64
|
CommandApplied?.Invoke(applied);
|
|
64
65
|
}
|
|
65
66
|
}
|
|
@@ -120,7 +121,20 @@ namespace HyperSamples.LaneRunner
|
|
|
120
121
|
|
|
121
122
|
private bool IsGrounded()
|
|
122
123
|
{
|
|
123
|
-
return body.position.y <= 0.
|
|
124
|
+
return body.position.y <= groundHeight + 0.18f && body.linearVelocity.y <= 0.05f;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
private void StabilizeGround()
|
|
128
|
+
{
|
|
129
|
+
if (body.position.y >= groundHeight || body.linearVelocity.y > 0f) return;
|
|
130
|
+
|
|
131
|
+
Vector3 position = body.position;
|
|
132
|
+
position.y = groundHeight;
|
|
133
|
+
body.position = position;
|
|
134
|
+
|
|
135
|
+
Vector3 velocity = body.linearVelocity;
|
|
136
|
+
velocity.y = 0f;
|
|
137
|
+
body.linearVelocity = velocity;
|
|
124
138
|
}
|
|
125
139
|
|
|
126
140
|
private void ReadTouchInput()
|
|
@@ -61,7 +61,9 @@ namespace HyperSamples.LaneRunner
|
|
|
61
61
|
{
|
|
62
62
|
for (int i = activeItems.Count - 1; i >= 0; i--)
|
|
63
63
|
{
|
|
64
|
-
if (activeItems[i]
|
|
64
|
+
if (activeItems[i] == null) continue;
|
|
65
|
+
activeItems[i].gameObject.SetActive(false);
|
|
66
|
+
Destroy(activeItems[i].gameObject);
|
|
65
67
|
}
|
|
66
68
|
activeItems.Clear();
|
|
67
69
|
}
|
|
@@ -16,6 +16,7 @@ namespace HyperSamples.LaneRunner
|
|
|
16
16
|
{
|
|
17
17
|
HyperSDK.Event.OnGameStart += HandleGameStart;
|
|
18
18
|
HyperSDK.Event.OnGameEnded += HandleGameEnded;
|
|
19
|
+
HyperSDK.Event.OnCustomRestart += HandleCustomRestart;
|
|
19
20
|
game.ScoreChanged += HandleScoreChanged;
|
|
20
21
|
game.DoubleScoreChanged += HandleDoubleScoreChanged;
|
|
21
22
|
game.GameOverRequested += HandleGameOverRequested;
|
|
@@ -25,6 +26,7 @@ namespace HyperSamples.LaneRunner
|
|
|
25
26
|
{
|
|
26
27
|
HyperSDK.Event.OnGameStart -= HandleGameStart;
|
|
27
28
|
HyperSDK.Event.OnGameEnded -= HandleGameEnded;
|
|
29
|
+
HyperSDK.Event.OnCustomRestart -= HandleCustomRestart;
|
|
28
30
|
game.ScoreChanged -= HandleScoreChanged;
|
|
29
31
|
game.DoubleScoreChanged -= HandleDoubleScoreChanged;
|
|
30
32
|
game.GameOverRequested -= HandleGameOverRequested;
|
|
@@ -35,6 +37,12 @@ namespace HyperSamples.LaneRunner
|
|
|
35
37
|
game.Begin(!HyperSDK.Game.IsReplayMode);
|
|
36
38
|
}
|
|
37
39
|
|
|
40
|
+
private void HandleCustomRestart()
|
|
41
|
+
{
|
|
42
|
+
game.Stop();
|
|
43
|
+
HyperSDK.Game.CompleteCustomRestart();
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
private void HandleGameEnded()
|
|
39
47
|
{
|
|
40
48
|
game.Stop();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app.hypergames.hypersdk",
|
|
3
|
-
"version": "1.11.0-beta.
|
|
3
|
+
"version": "1.11.0-beta.21",
|
|
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",
|
|
Binary file
|