TimeOfDay script fixed

This commit is contained in:
PokingPines
2024-04-26 10:22:20 +02:00
parent bfb47e9b8d
commit f4d4e76f8b
2 changed files with 4 additions and 6 deletions

View File

@@ -1 +1 @@
{"count":1,"self":133.2106368,"total":136.1075323,"children":{"InitializeActuators":{"count":8,"self":0.0010054,"total":0.0010054,"children":null},"InitializeSensors":{"count":8,"self":0.0010002,"total":0.0010002,"children":null},"AgentSendState":{"count":4854,"self":0.2595425,"total":0.3360959,"children":{"CollectObservations":{"count":7768,"self":0.039823399999999995,"total":0.039823399999999995,"children":null},"WriteActionMask":{"count":7768,"self":0.0065368,"total":0.0065368,"children":null},"RequestDecision":{"count":7768,"self":0.0301932,"total":0.0301932,"children":null}}},"DecideAction":{"count":4854,"self":2.1690815999999997,"total":2.2024192,"children":{"RayPerceptionSensor.Perceive":{"count":15536,"self":0.0333376,"total":0.0333376,"children":null}}},"AgentAct":{"count":4854,"self":0.35185829999999996,"total":0.35185829999999996,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":4,"max":24.915411,"min":15.8891373,"runningAverage":22.56735,"value":15.8891373,"weightedAverage":22.5912132}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714117940","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":"WinScreen","end_time_seconds":"1714118076"}}
{"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"}}

View File

@@ -29,13 +29,15 @@ public class TimeOfDay : MonoBehaviour
RenderSettings.skybox = DaySkybox;
DayLight.SetActive(true);
skyboxMaterial = "Day";
TellTime.text = "Selected time of day: \n" + skyboxMaterial;
}
public void ChangeToNightTime()
{
DayLight.SetActive(false);
RenderSettings.skybox = NightSkybox;
NightLight.SetActive(true);
skyboxMaterial = "Night"; ;
skyboxMaterial = "Night";
TellTime.text = "Selected time of day: \n" + skyboxMaterial;
}
private void Awake()
{
@@ -44,8 +46,4 @@ public class TimeOfDay : MonoBehaviour
DisableAllLights();
ChangeToNightTime();
}
private void Update()
{
TellTime.text = "Selected time of day: \n" + skyboxMaterial;
}
}