Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a022009

Browse files
Fixes to the Main Menu
made it so the main menu actually moves betweenthe level select properly and also fixed the issue with the custom controls menu
1 parent d65ad3d commit a022009

File tree

4 files changed

+80
-55
lines changed

4 files changed

+80
-55
lines changed

‎Native_Compilation_Project/Assets/Menus/MenuManager.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class MenuManager : MonoBehaviour
2828
public GameObject sorter;
2929
public float moveAmmount;
3030
public int curLevel;
31+
public int[] currentLevelSceneIndex;
3132
private bool prematureUpdateCall = false;
3233

3334
[Header("Level Info Screen")]
@@ -61,6 +62,7 @@ public class MenuManager : MonoBehaviour
6162
// Start is called before the first frame update
6263
void Awake()
6364
{
65+
moveAmmount = Screen.width;
6466
curSelected = 0;
6567
curLevel = 0;
6668

@@ -149,7 +151,7 @@ void Update()
149151
{
150152
levelSelectScreen.SetActive(false);
151153
levelInfo.SetActive(true);
152-
level = curLevel;
154+
level = currentLevelSceneIndex[curLevel];
153155
}
154156
}
155157
else if (levelInfo.activeInHierarchy)
@@ -170,8 +172,8 @@ void Update()
170172
}
171173
else if (A.action.WasPressedThisFrame())
172174
{
173-
SceneManager.LoadSceneAsync(level+1);
174-
Debug.Log("LOAD LEVEL: " + (level+1).ToString());
175+
SceneManager.LoadSceneAsync(level);
176+
Debug.Log("LOAD LEVEL: " + (level).ToString());
175177
}
176178
}
177179
else if (settingsScreen.activeInHierarchy && !prematureUpdateCall)
@@ -189,18 +191,16 @@ void Update()
189191
else if (settingsControlOptions.activeInHierarchy)
190192
{
191193
if (Up.action.WasPressedThisFrame() && (curControlSetting == 1 ||
192-
curControlSetting == 2 ||
193-
curControlSetting == 4))
194+
curControlSetting == 3))
194195
curControlSetting--;
195196
else if (Down.action.WasPressedThisFrame() && (curControlSetting == 0 ||
196-
curControlSetting == 1 ||
197-
curControlSetting == 3))
197+
curControlSetting == 2))
198198
curControlSetting++;
199-
else if (Right.action.WasPressedThisFrame() && (curControlSetting == 1 ||
200-
curControlSetting == 2))
199+
else if (Right.action.WasPressedThisFrame() && (curControlSetting == 0 ||
200+
curControlSetting == 1))
201201
curControlSetting += 2;
202-
else if (Left.action.WasPressedThisFrame() && (curControlSetting == 3 ||
203-
curControlSetting == 4))
202+
else if (Left.action.WasPressedThisFrame() && (curControlSetting == 2 ||
203+
curControlSetting == 3))
204204
curControlSetting -= 2;
205205

206206
EventSystem.current.SetSelectedGameObject(null);

‎Native_Compilation_Project/Assets/Menus/PauseMenu.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public void resumeButton()
4848
public void menuButton()
4949
{
5050
Time.timeScale = 1f;
51+
Destroy(GameObject.FindGameObjectWithTag("MANAGER").GetComponent<GameManager>().gameObject);
5152
SceneManager.LoadScene(0);
5253
}
5354
public void exitButton()

‎Native_Compilation_Project/Assets/Menus/inGameManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public void OnEnable()
2828
{
2929
//activeDevice = null;
3030
activeDevice = Gamepad.current;
31+
canPause = true;
3132
//print(activeDevice);
3233
InputSystem.onDeviceChange += (device, change) =>
3334
{

‎Native_Compilation_Project/Assets/Scenes/MainMenu.unity

Lines changed: 67 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,7 @@ MonoBehaviour:
11601160
sorter: {fileID: 1322571092}
11611161
moveAmmount: 877
11621162
curLevel: 0
1163+
currentLevelSceneIndex: 020000000400000000000000000000000000000000000000
11631164
levelInfo: {fileID: 342930813}
11641165
level: 0
11651166
levelName: {fileID: 233735620}
@@ -1175,7 +1176,6 @@ MonoBehaviour:
11751176
settingsSoundOptions: {fileID: 1442238505}
11761177
settingsControlOptions: {fileID: 373150036}
11771178
controlSettingButtons:
1178-
- {fileID: 358306920}
11791179
- {fileID: 835771414}
11801180
- {fileID: 2099010715}
11811181
- {fileID: 1203114656}
@@ -1925,6 +1925,7 @@ MonoBehaviour:
19251925
m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3}
19261926
m_Name:
19271927
m_EditorClassIdentifier:
1928+
m_SendPointerHoverToParent: 1
19281929
m_MoveRepeatDelay: 0.5
19291930
m_MoveRepeatRate: 0.1
19301931
m_XRTrackingOrigin: {fileID: 0}
@@ -1941,6 +1942,7 @@ MonoBehaviour:
19411942
m_TrackedDeviceOrientationAction: {fileID: 0}
19421943
m_DeselectOnBackgroundClick: 1
19431944
m_PointerBehavior: 0
1945+
m_CursorLockBehavior: 0
19441946
--- !u!1 &342930813
19451947
GameObject:
19461948
m_ObjectHideFlags: 0
@@ -2807,7 +2809,7 @@ RectTransform:
28072809
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
28082810
m_AnchorMin: {x: 0.5, y: 0.5}
28092811
m_AnchorMax: {x: 0.5, y: 0.5}
2810-
m_AnchoredPosition: {x: 0, y: 187}
2812+
m_AnchoredPosition: {x: 0, y: 323}
28112813
m_SizeDelta: {x: 500, y: 100}
28122814
m_Pivot: {x: 0.5, y: 0.5}
28132815
--- !u!114 &411312507
@@ -4151,7 +4153,7 @@ RectTransform:
41514153
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
41524154
m_AnchorMin: {x: 0.5, y: 0.5}
41534155
m_AnchorMax: {x: 0.5, y: 0.5}
4154-
m_AnchoredPosition: {x: -450, y: 0}
4156+
m_AnchoredPosition: {x: -872, y: 0}
41554157
m_SizeDelta: {x: 100, y: 100}
41564158
m_Pivot: {x: 0.5, y: 0.5}
41574159
--- !u!114 &698848783
@@ -4401,7 +4403,7 @@ RectTransform:
44014403
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44024404
m_AnchorMin: {x: 0.5, y: 0.5}
44034405
m_AnchorMax: {x: 0.5, y: 0.5}
4404-
m_AnchoredPosition: {x: 0, y: 187}
4406+
m_AnchoredPosition: {x: 0, y: 328}
44054407
m_SizeDelta: {x: 500, y: 100}
44064408
m_Pivot: {x: 0.5, y: 0.5}
44074409
--- !u!114 &714483388
@@ -4906,6 +4908,7 @@ GameObject:
49064908
m_Component:
49074909
- component: {fileID: 740511188}
49084910
- component: {fileID: 740511187}
4911+
- component: {fileID: 740511189}
49094912
m_Layer: 0
49104913
m_Name: Directional Light
49114914
m_TagString: Untagged
@@ -4990,6 +4993,26 @@ Transform:
49904993
m_Father: {fileID: 0}
49914994
m_RootOrder: 1
49924995
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
4996+
--- !u!114 &740511189
4997+
MonoBehaviour:
4998+
m_ObjectHideFlags: 0
4999+
m_CorrespondingSourceObject: {fileID: 0}
5000+
m_PrefabInstance: {fileID: 0}
5001+
m_PrefabAsset: {fileID: 0}
5002+
m_GameObject: {fileID: 740511186}
5003+
m_Enabled: 1
5004+
m_EditorHideFlags: 0
5005+
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
5006+
m_Name:
5007+
m_EditorClassIdentifier:
5008+
m_Version: 1
5009+
m_UsePipelineSettings: 1
5010+
m_AdditionalLightsShadowResolutionTier: 2
5011+
m_LightLayerMask: 1
5012+
m_CustomShadowLayers: 0
5013+
m_ShadowLayerMask: 1
5014+
m_LightCookieSize: {x: 1, y: 1}
5015+
m_LightCookieOffset: {x: 0, y: 0}
49935016
--- !u!1 &740941257
49945017
GameObject:
49955018
m_ObjectHideFlags: 0
@@ -5601,7 +5624,7 @@ RectTransform:
56015624
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
56025625
m_AnchorMin: {x: 0.5, y: 0.5}
56035626
m_AnchorMax: {x: 0.5, y: 0.5}
5604-
m_AnchoredPosition: {x: 0, y: 187}
5627+
m_AnchoredPosition: {x: 0, y: 328}
56055628
m_SizeDelta: {x: 500, y: 100}
56065629
m_Pivot: {x: 0.5, y: 0.5}
56075630
--- !u!114 &848068958
@@ -6396,7 +6419,7 @@ RectTransform:
63966419
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
63976420
m_AnchorMin: {x: 0.5, y: 0.5}
63986421
m_AnchorMax: {x: 0.5, y: 0.5}
6399-
m_AnchoredPosition: {x: 0, y: 187}
6422+
m_AnchoredPosition: {x: 0, y: 328}
64006423
m_SizeDelta: {x: 500, y: 100}
64016424
m_Pivot: {x: 0.5, y: 0.5}
64026425
--- !u!114 &943533833
@@ -7257,10 +7280,10 @@ RectTransform:
72577280
m_Father: {fileID: 1322571093}
72587281
m_RootOrder: 5
72597282
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
7260-
m_AnchorMin: {x: 0, y: 1}
7261-
m_AnchorMax: {x: 0, y: 1}
7262-
m_AnchoredPosition: {x: 5610, y: -235}
7263-
m_SizeDelta: {x: 1020, y: 470}
7283+
m_AnchorMin: {x: 0, y: 0}
7284+
m_AnchorMax: {x: 0, y: 0}
7285+
m_AnchoredPosition: {x: 0, y: 0}
7286+
m_SizeDelta: {x: 0, y: 0}
72647287
m_Pivot: {x: 0.5, y: 0.5}
72657288
--- !u!114 &1108994995
72667289
MonoBehaviour:
@@ -7372,10 +7395,10 @@ RectTransform:
73727395
m_Father: {fileID: 1322571093}
73737396
m_RootOrder: 2
73747397
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
7375-
m_AnchorMin: {x: 0, y: 1}
7376-
m_AnchorMax: {x: 0, y: 1}
7377-
m_AnchoredPosition: {x: 2550, y: -235}
7378-
m_SizeDelta: {x: 1020, y: 470}
7398+
m_AnchorMin: {x: 0, y: 0}
7399+
m_AnchorMax: {x: 0, y: 0}
7400+
m_AnchoredPosition: {x: 0, y: 0}
7401+
m_SizeDelta: {x: 0, y: 0}
73797402
m_Pivot: {x: 0.5, y: 0.5}
73807403
--- !u!114 &1195017663
73817404
MonoBehaviour:
@@ -8166,7 +8189,7 @@ MonoBehaviour:
81668189
m_ChildAlignment: 0
81678190
m_StartCorner: 0
81688191
m_StartAxis: 1
8169-
m_CellSize: {x: 1020, y: 470}
8192+
m_CellSize: {x: 1920, y: 870}
81708193
m_Spacing: {x: 0, y: 0}
81718194
m_Constraint: 0
81728195
m_ConstraintCount: 2
@@ -8205,10 +8228,10 @@ RectTransform:
82058228
m_Father: {fileID: 1322571093}
82068229
m_RootOrder: 0
82078230
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
8208-
m_AnchorMin: {x: 0, y: 1}
8209-
m_AnchorMax: {x: 0, y: 1}
8210-
m_AnchoredPosition: {x: 510, y: -235}
8211-
m_SizeDelta: {x: 1020, y: 470}
8231+
m_AnchorMin: {x: 0, y: 0}
8232+
m_AnchorMax: {x: 0, y: 0}
8233+
m_AnchoredPosition: {x: 0, y: 0}
8234+
m_SizeDelta: {x: 0, y: 0}
82128235
m_Pivot: {x: 0.5, y: 0.5}
82138236
--- !u!114 &1344882851
82148237
MonoBehaviour:
@@ -8423,7 +8446,7 @@ GameObject:
84238446
m_Icon: {fileID: 0}
84248447
m_NavMeshLayer: 0
84258448
m_StaticEditorFlags: 0
8426-
m_IsActive: 0
8449+
m_IsActive: 1
84278450
--- !u!114 &1454026566
84288451
MonoBehaviour:
84298452
m_ObjectHideFlags: 0
@@ -8456,9 +8479,9 @@ MonoBehaviour:
84568479
m_UiScaleMode: 1
84578480
m_ReferencePixelsPerUnit: 100
84588481
m_ScaleFactor: 1
8459-
m_ReferenceResolution: {x: 800, y: 600}
8482+
m_ReferenceResolution: {x: 1920, y: 1080}
84608483
m_ScreenMatchMode: 0
8461-
m_MatchWidthOrHeight: 0.5
8484+
m_MatchWidthOrHeight: 0
84628485
m_PhysicalUnit: 3
84638486
m_FallbackScreenDPI: 96
84648487
m_DefaultSpriteDPI: 96
@@ -8679,7 +8702,7 @@ RectTransform:
86798702
m_AnchorMin: {x: 0.5, y: 0.5}
86808703
m_AnchorMax: {x: 0.5, y: 0.5}
86818704
m_AnchoredPosition: {x: 0, y: -50}
8682-
m_SizeDelta: {x: 500, y: 250}
8705+
m_SizeDelta: {x: 1000, y: 450}
86838706
m_Pivot: {x: 0.5, y: 0.5}
86848707
--- !u!114 &1469778435
86858708
MonoBehaviour:
@@ -8755,7 +8778,7 @@ RectTransform:
87558778
m_AnchorMin: {x: 0.5, y: 0.5}
87568779
m_AnchorMax: {x: 0.5, y: 0.5}
87578780
m_AnchoredPosition: {x: 0, y: -50}
8758-
m_SizeDelta: {x: 500, y: 250}
8781+
m_SizeDelta: {x: 1000, y: 450}
87598782
m_Pivot: {x: 0.5, y: 0.5}
87608783
--- !u!114 &1480898192
87618784
MonoBehaviour:
@@ -9260,7 +9283,7 @@ RectTransform:
92609283
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
92619284
m_AnchorMin: {x: 0.5, y: 0.5}
92629285
m_AnchorMax: {x: 0.5, y: 0.5}
9263-
m_AnchoredPosition: {x: 0, y: 187}
9286+
m_AnchoredPosition: {x: 0, y: 328}
92649287
m_SizeDelta: {x: 500, y: 100}
92659288
m_Pivot: {x: 0.5, y: 0.5}
92669289
--- !u!114 &1559391912
@@ -9698,7 +9721,7 @@ RectTransform:
96989721
m_AnchorMin: {x: 0.5, y: 0.5}
96999722
m_AnchorMax: {x: 0.5, y: 0.5}
97009723
m_AnchoredPosition: {x: 0, y: -50}
9701-
m_SizeDelta: {x: 500, y: 250}
9724+
m_SizeDelta: {x: 1000, y: 450}
97029725
m_Pivot: {x: 0.5, y: 0.5}
97039726
--- !u!114 &1628515386
97049727
MonoBehaviour:
@@ -10194,10 +10217,10 @@ RectTransform:
1019410217
m_Father: {fileID: 1322571093}
1019510218
m_RootOrder: 1
1019610219
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
10197-
m_AnchorMin: {x: 0, y: 1}
10198-
m_AnchorMax: {x: 0, y: 1}
10199-
m_AnchoredPosition: {x: 1530, y: -235}
10200-
m_SizeDelta: {x: 1020, y: 470}
10220+
m_AnchorMin: {x: 0, y: 0}
10221+
m_AnchorMax: {x: 0, y: 0}
10222+
m_AnchoredPosition: {x: 0, y: 0}
10223+
m_SizeDelta: {x: 0, y: 0}
1020110224
m_Pivot: {x: 0.5, y: 0.5}
1020210225
--- !u!114 &1670956319
1020310226
MonoBehaviour:
@@ -10407,10 +10430,10 @@ RectTransform:
1040710430
m_Father: {fileID: 1322571093}
1040810431
m_RootOrder: 4
1040910432
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
10410-
m_AnchorMin: {x: 0, y: 1}
10411-
m_AnchorMax: {x: 0, y: 1}
10412-
m_AnchoredPosition: {x: 4590, y: -235}
10413-
m_SizeDelta: {x: 1020, y: 470}
10433+
m_AnchorMin: {x: 0, y: 0}
10434+
m_AnchorMax: {x: 0, y: 0}
10435+
m_AnchoredPosition: {x: 0, y: 0}
10436+
m_SizeDelta: {x: 0, y: 0}
1041410437
m_Pivot: {x: 0.5, y: 0.5}
1041510438
--- !u!114 &1700723218
1041610439
MonoBehaviour:
@@ -10561,7 +10584,7 @@ RectTransform:
1056110584
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
1056210585
m_AnchorMin: {x: 0.5, y: 0.5}
1056310586
m_AnchorMax: {x: 0.5, y: 0.5}
10564-
m_AnchoredPosition: {x: 0, y: 187}
10587+
m_AnchoredPosition: {x: 0, y: 328}
1056510588
m_SizeDelta: {x: 500, y: 100}
1056610589
m_Pivot: {x: 0.5, y: 0.5}
1056710590
--- !u!114 &1733494138
@@ -10697,7 +10720,7 @@ RectTransform:
1069710720
m_AnchorMin: {x: 0.5, y: 0.5}
1069810721
m_AnchorMax: {x: 0.5, y: 0.5}
1069910722
m_AnchoredPosition: {x: 0, y: -50}
10700-
m_SizeDelta: {x: 500, y: 250}
10723+
m_SizeDelta: {x: 1000, y: 450}
1070110724
m_Pivot: {x: 0.5, y: 0.5}
1070210725
--- !u!114 &1754780011
1070310726
MonoBehaviour:
@@ -10863,7 +10886,7 @@ RectTransform:
1086310886
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
1086410887
m_AnchorMin: {x: 0.5, y: 0.5}
1086510888
m_AnchorMax: {x: 0.5, y: 0.5}
10866-
m_AnchoredPosition: {x: 450, y: 0}
10889+
m_AnchoredPosition: {x: 894, y: 0}
1086710890
m_SizeDelta: {x: 100, y: 100}
1086810891
m_Pivot: {x: 0.5, y: 0.5}
1086910892
--- !u!114 &1773075300
@@ -11150,7 +11173,7 @@ RectTransform:
1115011173
m_AnchorMin: {x: 0.5, y: 0.5}
1115111174
m_AnchorMax: {x: 0.5, y: 0.5}
1115211175
m_AnchoredPosition: {x: 0, y: -50}
11153-
m_SizeDelta: {x: 500, y: 250}
11176+
m_SizeDelta: {x: 1000, y: 450}
1115411177
m_Pivot: {x: 0.5, y: 0.5}
1115511178
--- !u!114 &1853339451
1115611179
MonoBehaviour:
@@ -11766,7 +11789,7 @@ RectTransform:
1176611789
m_AnchorMin: {x: 0.5, y: 0.5}
1176711790
m_AnchorMax: {x: 0.5, y: 0.5}
1176811791
m_AnchoredPosition: {x: 0, y: -50}
11769-
m_SizeDelta: {x: 500, y: 250}
11792+
m_SizeDelta: {x: 1000, y: 450}
1177011793
m_Pivot: {x: 0.5, y: 0.5}
1177111794
--- !u!114 &1889313728
1177211795
MonoBehaviour:
@@ -11824,7 +11847,7 @@ GameObject:
1182411847
m_Icon: {fileID: 0}
1182511848
m_NavMeshLayer: 0
1182611849
m_StaticEditorFlags: 0
11827-
m_IsActive: 1
11850+
m_IsActive: 0
1182811851
--- !u!114 &1894562053
1182911852
MonoBehaviour:
1183011853
m_ObjectHideFlags: 0
@@ -12318,10 +12341,10 @@ RectTransform:
1231812341
m_Father: {fileID: 1322571093}
1231912342
m_RootOrder: 3
1232012343
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
12321-
m_AnchorMin: {x: 0, y: 1}
12322-
m_AnchorMax: {x: 0, y: 1}
12323-
m_AnchoredPosition: {x: 3570, y: -235}
12324-
m_SizeDelta: {x: 1020, y: 470}
12344+
m_AnchorMin: {x: 0, y: 0}
12345+
m_AnchorMax: {x: 0, y: 0}
12346+
m_AnchoredPosition: {x: 0, y: 0}
12347+
m_SizeDelta: {x: 0, y: 0}
1232512348
m_Pivot: {x: 0.5, y: 0.5}
1232612349
--- !u!114 &2087406816
1232712350
MonoBehaviour:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /