From cf2e4cee2c9d2f8a7b8efd7896a081e52f67d8fa Mon Sep 17 00:00:00 2001 From: Koha9 Date: Mon, 24 Oct 2022 00:14:06 +0900 Subject: [PATCH] Unity Fix Timelimit UI didn't work Unity Fix Timelimit UI didn't work --- .../Assets/ML-Agents/Timers/InGame_timers.json | 2 +- Aimbot-PPO-MultiScene/Assets/Scenes/Start.unity | 10 +++++----- .../Assets/Script/Start/StartSeneData.cs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Aimbot-PPO-MultiScene/Assets/ML-Agents/Timers/InGame_timers.json b/Aimbot-PPO-MultiScene/Assets/ML-Agents/Timers/InGame_timers.json index 942ffcd..778cfb8 100644 --- a/Aimbot-PPO-MultiScene/Assets/ML-Agents/Timers/InGame_timers.json +++ b/Aimbot-PPO-MultiScene/Assets/ML-Agents/Timers/InGame_timers.json @@ -1 +1 @@ -{"count":1,"self":14.364236799999999,"total":14.7678687,"children":{"InitializeActuators":{"count":2,"self":0.0009999,"total":0.0009999,"children":null},"InitializeSensors":{"count":2,"self":0.0010008,"total":0.0010008,"children":null},"AgentSendState":{"count":504,"self":0.0060111,"total":0.0636617,"children":{"CollectObservations":{"count":504,"self":0.0546419,"total":0.0546419,"children":null},"WriteActionMask":{"count":503,"self":0.001006,"total":0.001006,"children":null},"RequestDecision":{"count":503,"self":0.0020027,"total":0.0020027,"children":null}}},"DecideAction":{"count":503,"self":0.0035023,"total":0.0035023,"children":null},"AgentAct":{"count":503,"self":0.3304658,"total":0.3304658,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1665764651","unity_version":"2020.3.19f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2020.3.19f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-PPO\\Aimbot-PPO-MultiScene -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-mO9W_RqJkSeNPEPgTMbRK -hubSessionId b189fbf0-4bd9-11ed-af18-5796c8a9db6e -accessToken 0gt45CYC6M5EI-dlFucvkHWtcpKMAExHCZ5Lm71p-7E00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.0","scene_name":"InGame","end_time_seconds":"1665764666"}} \ No newline at end of file +{"count":1,"self":12.279527999999999,"total":12.4987023,"children":{"InitializeActuators":{"count":2,"self":0.0009998,"total":0.0009998,"children":null},"InitializeSensors":{"count":2,"self":0.0014946,"total":0.0014946,"children":null},"AgentSendState":{"count":391,"self":0.0045030999999999995,"total":0.08056519999999999,"children":{"CollectObservations":{"count":391,"self":0.0745624,"total":0.0745624,"children":null},"WriteActionMask":{"count":391,"self":0,"total":0,"children":null},"RequestDecision":{"count":391,"self":0.0014996999999999999,"total":0.0014996999999999999,"children":null}}},"DecideAction":{"count":391,"self":0.0040221,"total":0.0040221,"children":null},"AgentAct":{"count":391,"self":0.1305816,"total":0.1305816,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1666536692","unity_version":"2020.3.19f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2020.3.19f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-PPO\\Aimbot-PPO-MultiScene -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId d9586dc0-52db-11ed-b872-a92f6803ef60 -accessToken fnNcXGed14xZ4T2QDjYvkfHJGstBdUCo4Db2J0SHVQY00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.0","scene_name":"InGame","end_time_seconds":"1666536704"}} \ No newline at end of file diff --git a/Aimbot-PPO-MultiScene/Assets/Scenes/Start.unity b/Aimbot-PPO-MultiScene/Assets/Scenes/Start.unity index e365d0a..5a2c852 100644 --- a/Aimbot-PPO-MultiScene/Assets/Scenes/Start.unity +++ b/Aimbot-PPO-MultiScene/Assets/Scenes/Start.unity @@ -375,9 +375,9 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 0} - m_TargetAssemblyTypeName: StartSceneTimeLimChanger, Assembly-CSharp - m_MethodName: onValueTimeChanged + - m_Target: {fileID: 2024406051} + m_TargetAssemblyTypeName: EnvArgsChanger, Assembly-CSharp + m_MethodName: onTimeValueChanged m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -4933,7 +4933,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: 30 + m_Text: 15 --- !u!222 &1199381302 CanvasRenderer: m_ObjectHideFlags: 0 @@ -5473,7 +5473,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: -10.0 + m_Text: -0.05 --- !u!222 &1507283001 CanvasRenderer: m_ObjectHideFlags: 0 diff --git a/Aimbot-PPO-MultiScene/Assets/Script/Start/StartSeneData.cs b/Aimbot-PPO-MultiScene/Assets/Script/Start/StartSeneData.cs index 1bdf784..22e4f4d 100644 --- a/Aimbot-PPO-MultiScene/Assets/Script/Start/StartSeneData.cs +++ b/Aimbot-PPO-MultiScene/Assets/Script/Start/StartSeneData.cs @@ -12,7 +12,7 @@ public class StartSeneData : MonoBehaviour public float hitRewardDefault = 5.0f; public float killRewardDefault = 10.0f; public float winRewardDefault = 20.0f; - public float loseRewardDefault = -10.0f; + public float loseRewardDefault = -0.05f; public bool lockMouse = false; public bool defaultTPCamera = true; @@ -37,7 +37,7 @@ public class StartSeneData : MonoBehaviour [System.NonSerialized] public int EnemyNum = 3; // TimeLimit - [System.NonSerialized] public int Timelim = 30; + [System.NonSerialized] public int Timelim = 15; private void Start() {