Map selector done

This commit is contained in:
PokingPines
2024-04-26 09:26:50 +02:00
parent 6dd5933873
commit 334dee6bf0
9 changed files with 1112 additions and 670 deletions

View File

@@ -0,0 +1,66 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!850595691 &4890085278179872738
LightingSettings:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Demo DaySettings
serializedVersion: 6
m_GIWorkflowMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_RealtimeEnvironmentLighting: 1
m_BounceScale: 1
m_AlbedoBoost: 1
m_IndirectOutputScale: 1
m_UsingShadowmask: 0
m_BakeBackend: 0
m_LightmapMaxSize: 1024
m_BakeResolution: 40
m_Padding: 2
m_LightmapCompression: 3
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAO: 0
m_MixedBakeMode: 0
m_LightmapsBakeMode: 1
m_FilterMode: 1
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_RealtimeResolution: 2
m_ForceWhiteAlbedo: 0
m_ForceUpdates: 0
m_FinalGather: 0
m_FinalGatherRayCount: 256
m_FinalGatherFiltering: 1
m_PVRCulling: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVREnvironmentSampleCount: 512
m_PVREnvironmentReferencePointCount: 2048
m_LightProbeSampleCountMultiplier: 4
m_PVRBounces: 2
m_PVRMinBounces: 2
m_PVREnvironmentImportanceSampling: 0
m_PVRFilteringMode: 2
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_PVRTiledBaking: 0
m_NumRaysToShootPerTexel: -1
m_RespectSceneVisibilityWhenBakingGI: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 25e498c4d2b855947abb03d41c36507e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 4890085278179872738
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1 +1 @@
{"count":1,"self":50.872592,"total":50.954067699999996,"children":{"InitializeActuators":{"count":1,"self":0.0010263,"total":0.0010263,"children":null},"InitializeSensors":{"count":1,"self":0.0015439,"total":0.0015439,"children":null},"AgentSendState":{"count":2204,"self":0.0344133,"total":0.038423599999999995,"children":{"CollectObservations":{"count":86,"self":0.0009994,"total":0.0009994,"children":null},"WriteActionMask":{"count":86,"self":0.0010086,"total":0.0010086,"children":null},"RequestDecision":{"count":86,"self":0.0010004,"total":0.0020023,"children":{"RayPerceptionSensor.Perceive":{"count":172,"self":0.0010019,"total":0.0010019,"children":null}}}}},"DecideAction":{"count":2204,"self":0.035701699999999996,"total":0.035701699999999996,"children":null},"AgentAct":{"count":2204,"self":0.0047789,"total":0.0047789,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714050106","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 9c1f01bb-11a4-4f0f-a783-b9132e478973 -accessToken 4E81NOgN5ztdhX4t4u3WEoX4xouq9HnIn-2L54HpD0Y005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Map selector","end_time_seconds":"1714050157"}} {"count":1,"self":29.785408,"total":29.9198213,"children":{"InitializeActuators":{"count":1,"self":0.00099969999999999985,"total":0.00099969999999999985,"children":null},"InitializeSensors":{"count":1,"self":0.0025277999999999998,"total":0.0025277999999999998,"children":null},"AgentSendState":{"count":521,"self":0.0782659,"total":0.130885,"children":{"CollectObservations":{"count":521,"self":0.052619099999999995,"total":0.052619099999999995,"children":null}}}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714116183","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":"Map selector","end_time_seconds":"1714116213"}}

View File

@@ -1 +1 @@
{"count":1,"self":138.9299456,"total":140.8284301,"children":{"InitializeActuators":{"count":8,"self":0.0010004999999999999,"total":0.0010004999999999999,"children":null},"InitializeSensors":{"count":8,"self":0.0025084,"total":0.0025084,"children":null},"AgentSendState":{"count":6805,"self":0.39578209999999997,"total":0.50476579999999993,"children":{"CollectObservations":{"count":10888,"self":0.062793,"total":0.062793,"children":null},"WriteActionMask":{"count":10888,"self":0.014744499999999999,"total":0.014744499999999999,"children":null},"RequestDecision":{"count":10888,"self":0.0314462,"total":0.0314462,"children":null}}},"DecideAction":{"count":6805,"self":0.94154549999999992,"total":0.97379739999999992,"children":{"RayPerceptionSensor.Perceive":{"count":21776,"self":0.0322519,"total":0.0322519,"children":null}}},"AgentAct":{"count":6805,"self":0.4153926,"total":0.4153926,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":37,"max":25.5315037,"min":-1.48766124,"runningAverage":6.426719,"value":4.999134,"weightedAverage":8.814682}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714051562","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 b034e26d-02c7-41ad-9a20-c198a628a35a -accessToken Dt6gMuGhvx1BDLlNSM4Gg2t5w5_py5VVtuHcl5oYJQk005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Racetrack mini","end_time_seconds":"1714051702"}} {"count":1,"self":8.4118592,"total":8.6212582,"children":{"InitializeActuators":{"count":8,"self":0.0015846999999999999,"total":0.0015846999999999999,"children":null},"InitializeSensors":{"count":8,"self":0.0026517,"total":0.0026517,"children":null},"AgentSendState":{"count":165,"self":0.0284722,"total":0.0438079,"children":{"CollectObservations":{"count":264,"self":0.0020005,"total":0.0020005,"children":null},"WriteActionMask":{"count":264,"self":0.00051959999999999994,"total":0.00051959999999999994,"children":null},"RequestDecision":{"count":264,"self":0.0128156,"total":0.0128156,"children":null}}},"DecideAction":{"count":165,"self":0.1331645,"total":0.13570669999999999,"children":{"RayPerceptionSensor.Perceive":{"count":528,"self":0.0025421999999999997,"total":0.0025421999999999997,"children":null}}},"AgentAct":{"count":165,"self":0.0246146,"total":0.0246146,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714115397","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":"Racetrack mini","end_time_seconds":"1714115406"}}

View File

@@ -1 +1 @@
{"count":1,"self":45.2942848,"total":45.3013117,"children":{"InitializeActuators":{"count":1,"self":0,"total":0,"children":null},"InitializeSensors":{"count":1,"self":0.0020066999999999997,"total":0.0020066999999999997,"children":null},"AgentSendState":{"count":1,"self":0.0035031,"total":0.0045081,"children":{"CollectObservations":{"count":1,"self":0.001005,"total":0.001005,"children":null}}}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714051487","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 b034e26d-02c7-41ad-9a20-c198a628a35a -accessToken Dt6gMuGhvx1BDLlNSM4Gg2t5w5_py5VVtuHcl5oYJQk005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"mini_racetrack3","end_time_seconds":"1714051533"}} {"count":1,"self":11.8450048,"total":11.9435941,"children":{"InitializeActuators":{"count":1,"self":0.0010058,"total":0.0010058,"children":null},"InitializeSensors":{"count":1,"self":0.003534,"total":0.003534,"children":null},"AgentSendState":{"count":328,"self":0.0489465,"total":0.0925339,"children":{"CollectObservations":{"count":328,"self":0.0435874,"total":0.0435874,"children":null}}}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714116338","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":"mini_racetrack3","end_time_seconds":"1714116350"}}

View File

@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0} m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44783193, g: 0.4978208, b: 0.5754451, a: 1} m_IndirectSpecularColor: {r: 0.4482451, g: 0.49827182, b: 0.57558125, a: 1}
m_UseRadianceAmbientProbe: 0 m_UseRadianceAmbientProbe: 0
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
@@ -548,6 +548,7 @@ PrefabInstance:
- {fileID: 8294937918364224223, guid: 9a6052ce7b65c814285a6cb4659dab3c, type: 3} - {fileID: 8294937918364224223, guid: 9a6052ce7b65c814285a6cb4659dab3c, type: 3}
- {fileID: 6493244483487560032, guid: 9a6052ce7b65c814285a6cb4659dab3c, type: 3} - {fileID: 6493244483487560032, guid: 9a6052ce7b65c814285a6cb4659dab3c, type: 3}
- {fileID: 3639310642003440231, guid: 9a6052ce7b65c814285a6cb4659dab3c, type: 3} - {fileID: 3639310642003440231, guid: 9a6052ce7b65c814285a6cb4659dab3c, type: 3}
- {fileID: 1023705412061189779, guid: 9a6052ce7b65c814285a6cb4659dab3c, type: 3}
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9a6052ce7b65c814285a6cb4659dab3c, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 9a6052ce7b65c814285a6cb4659dab3c, type: 3}
@@ -1996,6 +1997,100 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1096132570} m_GameObject: {fileID: 1096132570}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1 &1179479087
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1179479088}
- component: {fileID: 1179479089}
m_Layer: 0
m_Name: NightLight
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1179479088
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1179479087}
serializedVersion: 2
m_LocalRotation: {x: 0.17250393, y: -0.5262795, z: 0.16878895, w: 0.81534195}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1193353612}
m_LocalEulerAnglesHint: {x: 27.320002, y: -64.21, z: 6.0520005}
--- !u!108 &1179479089
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1179479087}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 0.26379493, g: 0.40115762, b: 0.9811321, a: 1}
m_Intensity: 1.2
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: 3
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &1181192970 --- !u!1 &1181192970
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2159,7 +2254,14 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ab14f81283cca7e4c91a272a9773809d, type: 3} m_Script: {fileID: 11500000, guid: ab14f81283cca7e4c91a272a9773809d, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
DayLight: {fileID: 1348142924}
NightLight: {fileID: 1179479087}
skyboxMaterial: skyboxMaterial:
DaySkybox: {fileID: 2100000, guid: 86301280b87f5bb4bbf7633b535e2fc0, type: 2}
NightSkybox: {fileID: 2100000, guid: 1c8ac9deb3459a4448cc882add76b675, type: 2}
Lights:
- {fileID: 1348142924}
- {fileID: 1179479087}
MainText: {fileID: 1181192972} MainText: {fileID: 1181192972}
--- !u!4 &1193353612 --- !u!4 &1193353612
Transform: Transform:
@@ -2173,7 +2275,9 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children:
- {fileID: 1348142926}
- {fileID: 1179479088}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1272827913 stripped --- !u!4 &1272827913 stripped
@@ -2319,6 +2423,100 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5a9f1aa26b2a080419f59c5b5385d3b4, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 5a9f1aa26b2a080419f59c5b5385d3b4, type: 3}
--- !u!1 &1348142924
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1348142926}
- component: {fileID: 1348142925}
m_Layer: 0
m_Name: DayLight
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1348142925
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1348142924}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 0.84483033, g: 0.84313726, b: 0.99215686, a: 1}
m_Intensity: 1.5
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: 3
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1348142926
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1348142924}
serializedVersion: 2
m_LocalRotation: {x: 0.38268343, y: 0, z: 0, w: 0.92387956}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1193353612}
m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0}
--- !u!1001 &1409977001 --- !u!1001 &1409977001
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -10,7 +10,6 @@ public class SkyboxLoader : MonoBehaviour
void Awake() void Awake()
{ {
skyboxToLoad = GameObject.Find("SkyboxManager").GetComponent<TimeOfDay>().skyboxMaterial; skyboxToLoad = GameObject.Find("SkyboxManager").GetComponent<TimeOfDay>().skyboxMaterial;
Debug.Log("Skybox: " + skyboxToLoad);
if (skyboxToLoad == "Day") if (skyboxToLoad == "Day")
{ {
RenderSettings.skybox = skyboxDay; RenderSettings.skybox = skyboxDay;

View File

@@ -6,23 +6,43 @@ using TMPro;
public class TimeOfDay : MonoBehaviour public class TimeOfDay : MonoBehaviour
{ {
public string skyboxMaterial = "not selected"; public GameObject DayLight;
public GameObject NightLight;
public string skyboxMaterial = "Night";
public Material DaySkybox;
public Material NightSkybox;
public GameObject[] Lights;
public static TimeOfDay Instance; public static TimeOfDay Instance;
public TextMeshProUGUI MainText; public TextMeshProUGUI MainText;
void DisableAllLights()
{
foreach (GameObject light in Lights)
{
light.SetActive(false);
}
}
public void ChangeToDayTime() public void ChangeToDayTime()
{ {
NightLight.SetActive(false);
RenderSettings.skybox = DaySkybox;
DayLight.SetActive(true);
skyboxMaterial = "Day"; skyboxMaterial = "Day";
} }
public void ChangeToNightTime() public void ChangeToNightTime()
{ {
skyboxMaterial = "Night"; DayLight.SetActive(false);
RenderSettings.skybox = NightSkybox;
NightLight.SetActive(true);
skyboxMaterial = "Night"; ;
} }
private void Awake() private void Awake()
{ {
Instance = this; Instance = this;
DontDestroyOnLoad(gameObject); DontDestroyOnLoad(gameObject);
DisableAllLights();
NightLight.SetActive(true);
} }
private void Update() private void Update()
{ {