From 7152a5f4e57007d140585d80ae6af6521d1d8f07 Mon Sep 17 00:00:00 2001 From: magn9775 Date: Fri, 26 Apr 2024 10:58:34 +0200 Subject: [PATCH] Leaderboard --- .../Timers/Car Customization_timers.json | 2 +- .../Timers/ForestRacetrack_timers.json | 2 +- Assets/ML-Agents/Timers/WinScreen_timers.json | 2 +- Assets/Scenes/WinScreen.unity | 158 ++++++++++++++++-- Assets/Scripts/GameManager.cs | 2 + Assets/Scripts/WinScript.cs | 11 +- 6 files changed, 162 insertions(+), 15 deletions(-) diff --git a/Assets/ML-Agents/Timers/Car Customization_timers.json b/Assets/ML-Agents/Timers/Car Customization_timers.json index 1486c7a..199685a 100644 --- a/Assets/ML-Agents/Timers/Car Customization_timers.json +++ b/Assets/ML-Agents/Timers/Car Customization_timers.json @@ -1 +1 @@ -{"count":1,"self":7.029408,"total":7.1130119,"children":{"InitializeActuators":{"count":8,"self":0.0010186,"total":0.0010186,"children":null},"InitializeSensors":{"count":8,"self":0.0020006,"total":0.0020006,"children":null},"AgentSendState":{"count":1,"self":0.0043492,"total":0.0209833,"children":{"CollectObservations":{"count":8,"self":0,"total":0,"children":null},"WriteActionMask":{"count":8,"self":0,"total":0,"children":null},"RequestDecision":{"count":8,"self":0.0166341,"total":0.0166341,"children":null}}},"DecideAction":{"count":1,"self":0.059601799999999996,"total":0.059601799999999996,"children":{"RayPerceptionSensor.Perceive":{"count":16,"self":0,"total":0,"children":null}}},"AgentAct":{"count":1,"self":0,"total":0,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714117922","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\noahk\\Documents\\Unity projects\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-noahk -hubSessionId a6f45e0e-41b6-4c96-a70e-ec8e10ca5aa9 -accessToken LhF-MiZYoHmiI2p1_6JvQZvJ6QUPd4VyLbrTbhNHTT8005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Car Customization","end_time_seconds":"1714117929"}} \ No newline at end of file +{"count":1,"self":14.8922256,"total":15.657670399999999,"children":{"InitializeActuators":{"count":8,"self":0.0019944999999999997,"total":0.0019944999999999997,"children":null},"InitializeSensors":{"count":8,"self":0.0019947,"total":0.0019947,"children":null},"AgentSendState":{"count":314,"self":0.0484605,"total":0.0744336,"children":{"CollectObservations":{"count":504,"self":0.00801,"total":0.00801,"children":null},"WriteActionMask":{"count":504,"self":0.00099549999999999986,"total":0.00099549999999999986,"children":null},"RequestDecision":{"count":504,"self":0.0169676,"total":0.0169676,"children":null}}},"DecideAction":{"count":314,"self":0.63277189999999994,"total":0.6397572,"children":{"RayPerceptionSensor.Perceive":{"count":1008,"self":0.0069853,"total":0.0069853,"children":null}}},"AgentAct":{"count":314,"self":0.0472652,"total":0.0472652,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714121178","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\Magnus\\Desktop\\Ny unityting\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-Magnus -hubSessionId 8c17471b-7795-4082-905c-75744d6a077b -accessToken hv3zp4IA8nxcowfZc35r5tDHrlmzUZoExTBgESksngo005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Car Customization","end_time_seconds":"1714121194"}} \ No newline at end of file diff --git a/Assets/ML-Agents/Timers/ForestRacetrack_timers.json b/Assets/ML-Agents/Timers/ForestRacetrack_timers.json index a4d7d21..1577054 100644 --- a/Assets/ML-Agents/Timers/ForestRacetrack_timers.json +++ b/Assets/ML-Agents/Timers/ForestRacetrack_timers.json @@ -1 +1 @@ -{"count":1,"self":21.5131744,"total":23.13593,"children":{"InitializeActuators":{"count":8,"self":0.0025478,"total":0.0025478,"children":null},"InitializeSensors":{"count":8,"self":0.0029984,"total":0.0029984,"children":null},"AgentSendState":{"count":909,"self":0.13680989999999998,"total":0.1972582,"children":{"CollectObservations":{"count":1456,"self":0.031240499999999997,"total":0.031240499999999997,"children":null},"WriteActionMask":{"count":1456,"self":0.0027826,"total":0.0027826,"children":null},"RequestDecision":{"count":1456,"self":0.0264252,"total":0.0264252,"children":null}}},"DecideAction":{"count":909,"self":1.2634709,"total":1.28315,"children":{"RayPerceptionSensor.Perceive":{"count":2912,"self":0.019679099999999998,"total":0.019679099999999998,"children":null}}},"AgentAct":{"count":909,"self":0.1368018,"total":0.1368018,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714118759","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\hassa\\OneDrive\\Skrivebord\\alt pro\\Unity stuff\\Unity ting\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-hassa -hubSessionId f8278c6f-053c-492d-a479-00a9dbf73437 -accessToken 1rPuSgTkgUUOXMaGthhixd2ZEngLQ-H31CETUrEqtzM005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"ForestRacetrack","end_time_seconds":"1714118782"}} \ No newline at end of file +{"count":1,"self":10.4157048,"total":11.1841809,"children":{"InitializeActuators":{"count":8,"self":0.0019944999999999997,"total":0.0019944999999999997,"children":null},"InitializeSensors":{"count":8,"self":0.0019947,"total":0.0019947,"children":null},"AgentSendState":{"count":314,"self":0.0484605,"total":0.0744336,"children":{"CollectObservations":{"count":504,"self":0.00801,"total":0.00801,"children":null},"WriteActionMask":{"count":504,"self":0.00099549999999999986,"total":0.00099549999999999986,"children":null},"RequestDecision":{"count":504,"self":0.0169676,"total":0.0169676,"children":null}}},"DecideAction":{"count":314,"self":0.63277189999999994,"total":0.6397572,"children":{"RayPerceptionSensor.Perceive":{"count":1008,"self":0.0069853,"total":0.0069853,"children":null}}},"AgentAct":{"count":314,"self":0.0472652,"total":0.0472652,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714121178","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\Magnus\\Desktop\\Ny unityting\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-Magnus -hubSessionId 8c17471b-7795-4082-905c-75744d6a077b -accessToken hv3zp4IA8nxcowfZc35r5tDHrlmzUZoExTBgESksngo005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"ForestRacetrack","end_time_seconds":"1714121189"}} \ No newline at end of file diff --git a/Assets/ML-Agents/Timers/WinScreen_timers.json b/Assets/ML-Agents/Timers/WinScreen_timers.json index 8f30cf7..21d7cd7 100644 --- a/Assets/ML-Agents/Timers/WinScreen_timers.json +++ b/Assets/ML-Agents/Timers/WinScreen_timers.json @@ -1 +1 @@ -{"count":1,"self":309.1399424,"total":332.36884549999996,"children":{"InitializeActuators":{"count":8,"self":0.0025664999999999998,"total":0.0025664999999999998,"children":null},"InitializeSensors":{"count":8,"self":0.0032746,"total":0.0032746,"children":null},"AgentSendState":{"count":16365,"self":2.330854,"total":2.7563383,"children":{"CollectObservations":{"count":21936,"self":0.2326556,"total":0.2326556,"children":null},"WriteActionMask":{"count":21936,"self":0.0537007,"total":0.0537007,"children":null},"RequestDecision":{"count":21936,"self":0.1391281,"total":0.1391281,"children":null}}},"DecideAction":{"count":16365,"self":18.895307199999998,"total":19.2007151,"children":{"RayPerceptionSensor.Perceive":{"count":43872,"self":0.30540819999999996,"total":0.30540819999999996,"children":null}}},"AgentAct":{"count":16365,"self":1.2650044,"total":1.2650044,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":7,"max":24.6894,"min":10.6325016,"runningAverage":18.0623131,"value":14.3437386,"weightedAverage":17.18949}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714118988","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\hassa\\OneDrive\\Skrivebord\\alt pro\\Unity stuff\\Unity ting\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-hassa -hubSessionId f8278c6f-053c-492d-a479-00a9dbf73437 -accessToken 1rPuSgTkgUUOXMaGthhixd2ZEngLQ-H31CETUrEqtzM005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"WinScreen","end_time_seconds":"1714119320"}} \ No newline at end of file +{"count":1,"self":86.943936,"total":96.840498599999989,"children":{"InitializeActuators":{"count":8,"self":0.0029922,"total":0.0029922,"children":null},"InitializeSensors":{"count":8,"self":0.0029917,"total":0.0029917,"children":null},"AgentSendState":{"count":4582,"self":0.78503249999999991,"total":0.9650871,"children":{"CollectObservations":{"count":6288,"self":0.10648149999999999,"total":0.10648149999999999,"children":null},"WriteActionMask":{"count":6288,"self":0.02222,"total":0.02222,"children":null},"RequestDecision":{"count":6288,"self":0.0513531,"total":0.0513531,"children":null}}},"DecideAction":{"count":4582,"self":8.3173576,"total":8.4548896,"children":{"RayPerceptionSensor.Perceive":{"count":12576,"self":0.1375323,"total":0.1375323,"children":null}}},"AgentAct":{"count":4582,"self":0.46860939999999995,"total":0.46860939999999995,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":7,"max":24.91114,"min":19.7783585,"runningAverage":21.9734344,"value":21.0881538,"weightedAverage":21.94166}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714121754","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\Magnus\\Desktop\\Ny unityting\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-Magnus -hubSessionId 8c17471b-7795-4082-905c-75744d6a077b -accessToken hv3zp4IA8nxcowfZc35r5tDHrlmzUZoExTBgESksngo005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"WinScreen","end_time_seconds":"1714121851"}} \ No newline at end of file diff --git a/Assets/Scenes/WinScreen.unity b/Assets/Scenes/WinScreen.unity index 9bb6746..cb7b4d7 100644 --- a/Assets/Scenes/WinScreen.unity +++ b/Assets/Scenes/WinScreen.unity @@ -367,7 +367,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -3 objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.y @@ -437,7 +437,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -3 objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.y @@ -497,6 +497,140 @@ Transform: m_CorrespondingSourceObject: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} m_PrefabInstance: {fileID: 484370173} m_PrefabAsset: {fileID: 0} +--- !u!1 &621793358 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 621793361} + - component: {fileID: 621793360} + - component: {fileID: 621793359} + m_Layer: 5 + m_Name: Leaderboard Time + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &621793359 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 621793358} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 35 + m_fontSizeBase: 35 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 277.27832, y: -52.68463, z: 0, w: -519.90564} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &621793360 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 621793358} + m_CullTransparentMesh: 1 +--- !u!224 &621793361 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 621793358} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2002437009} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 928, y: 230} + m_SizeDelta: {x: 1000, y: 400} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1001 &784053825 PrefabInstance: m_ObjectHideFlags: 0 @@ -682,6 +816,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: MainText: {fileID: 1879694848} + MainText2: {fileID: 621793359} leaderboard: - L - w @@ -913,7 +1048,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -3 objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.y @@ -992,7 +1127,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -3 objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.y @@ -1334,7 +1469,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -3 objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.y @@ -1874,7 +2009,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -3 objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.y @@ -2049,8 +2184,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 50 - m_fontSizeBase: 50 + m_fontSize: 35 + m_fontSizeBase: 35 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -2195,6 +2330,7 @@ RectTransform: m_Children: - {fileID: 1093066530} - {fileID: 1879694847} + - {fileID: 621793361} - {fileID: 1688019505} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -2221,7 +2357,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -3 objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.y @@ -2307,7 +2443,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -3 objectReference: {fileID: 0} - target: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_LocalPosition.y @@ -2351,7 +2487,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5471432146962600635, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 6033441500748191172, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3} propertyPath: car diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index c012258..579a7b7 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -23,6 +23,8 @@ public class GameManager : MonoBehaviour { playerLaps[i] = 1; } + + DontDestroyOnLoad(gameObject); } // Update is called once per frame diff --git a/Assets/Scripts/WinScript.cs b/Assets/Scripts/WinScript.cs index c03da34..58cabad 100644 --- a/Assets/Scripts/WinScript.cs +++ b/Assets/Scripts/WinScript.cs @@ -5,13 +5,17 @@ using TMPro; public class WinScript : MonoBehaviour { public TextMeshProUGUI MainText; + public TextMeshProUGUI MainText2; public List leaderboard; public List time; + public GameObject winner; void Start() { leaderboard = GameObject.Find("GameManager").GetComponent().playersFinished; time = GameObject.Find("GameManager").GetComponent().playerTimes; + + } @@ -19,10 +23,15 @@ public class WinScript : MonoBehaviour private void Update() { MainText.text = "Leaderboard: "; + MainText2.text = "\n"; for (var i = 0; i < leaderboard.Count; i++){ - MainText.text += "\n" + (i+1) + "." + leaderboard[i] + "(" + time[i] + ")"; + MainText.text += "\n" + (i+1) + "." + leaderboard[i]; + MainText2.text += "\n(" + time[i] + ")"; } } + + + }