diff --git a/Assets/AWSIM/Prefabs/UI/Vehicle Dashboard.prefab b/Assets/AWSIM/Prefabs/UI/Vehicle Dashboard.prefab index 2f847fd1c..db0041fd2 100644 --- a/Assets/AWSIM/Prefabs/UI/Vehicle Dashboard.prefab +++ b/Assets/AWSIM/Prefabs/UI/Vehicle Dashboard.prefab @@ -738,7 +738,7 @@ RectTransform: m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 125, y: 50} + m_SizeDelta: {x: 125, y: 70} m_Pivot: {x: 1, y: 0} --- !u!222 &5985526962340375484 CanvasRenderer: diff --git a/Assets/AWSIM/Scenes/Composition/AWSIMSimulation.unity b/Assets/AWSIM/Scenes/Composition/AWSIMSimulation.unity index 8b3b862eb..eb21bedb8 100644 --- a/Assets/AWSIM/Scenes/Composition/AWSIMSimulation.unity +++ b/Assets/AWSIM/Scenes/Composition/AWSIMSimulation.unity @@ -1305,6 +1305,188 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: -20} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1001 &291706002 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1987073787} + m_Modifications: + - target: {fileID: 490485276830483272, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 490485276830483272, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 490485276830483272, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 490485276830483272, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 490485276830483272, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1540594835373909981, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1540594835373909981, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1540594835373909981, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1540594835373909981, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1540594835373909981, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_SizeDelta.x + value: 125 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_SizeDelta.y + value: 70 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4430727111052778003, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_Name + value: Vehicle Dashboard + objectReference: {fileID: 0} + - target: {fileID: 8816851931006714352, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8816851931006714352, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8816851931006714352, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8816851931006714352, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8816851931006714352, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8953770003924022276, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8953770003924022276, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8953770003924022276, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8953770003924022276, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8953770003924022276, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 52acd88437755e335b0382890e7e45b2, type: 3} +--- !u!224 &291706003 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1975691864731210933, guid: 52acd88437755e335b0382890e7e45b2, type: 3} + m_PrefabInstance: {fileID: 291706002} + m_PrefabAsset: {fileID: 0} --- !u!1 &364586755 GameObject: m_ObjectHideFlags: 0 @@ -10288,6 +10470,7 @@ RectTransform: - {fileID: 2090544236} - {fileID: 1816359443} - {fileID: 565615452} + - {fileID: 291706003} m_Father: {fileID: 985464703} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} diff --git a/Assets/AWSIM/Scripts/Loader/SimConfiguration.cs b/Assets/AWSIM/Scripts/Loader/SimConfiguration.cs index 996a8834f..567922133 100644 --- a/Assets/AWSIM/Scripts/Loader/SimConfiguration.cs +++ b/Assets/AWSIM/Scripts/Loader/SimConfiguration.cs @@ -1,10 +1,5 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; -using System; -using UnityEngine.UI; using UnityEngine.SceneManagement; -using System.Linq; using AWSIM.Scripts.UI.Toggle; using AWSIM.Scripts.UI; using AWSIM.TrafficSimulation; @@ -87,6 +82,9 @@ static public void Configure(EgosManager egoManager, MapManager mapManager, Simu UIMainCameraToggle uiMainCameraToggle = GameObject.FindObjectOfType(); uiMainCameraToggle.Activate(); + VehicleDashboard vehicleDashboard = GameObject.FindObjectOfType(); + vehicleDashboard.Activate(); + // Set traffic on/off var trafficSims = GameObject.FindObjectsOfType(); foreach (var trafficSim in trafficSims) diff --git a/Assets/AWSIM/Scripts/UI/VehicleDashboard.cs b/Assets/AWSIM/Scripts/UI/VehicleDashboard.cs index d97526096..eddbcfd69 100644 --- a/Assets/AWSIM/Scripts/UI/VehicleDashboard.cs +++ b/Assets/AWSIM/Scripts/UI/VehicleDashboard.cs @@ -41,6 +41,11 @@ private void Start() } } + public void Activate() + { + Start(); + } + private void FixedUpdate() { if (_vehicleController == null) return; @@ -103,7 +108,7 @@ private static string UpdateSpeed(VPVehicleController vehicle) return speedVal.ToString("F0"); } - private string UpdateTransmissionMode(int modeVal) + private static string UpdateTransmissionMode(int modeVal) { return modeVal switch {