44 AWeather(
const FObjectInitializer& ObjectInitializer);
47 UFUNCTION(BlueprintCallable)
51 void NotifyWeather(
ASensor* Sensor =
nullptr);
54 UFUNCTION(BlueprintCallable)
58 UFUNCTION(BlueprintCallable)
72 UFUNCTION(BlueprintCallable)
73 const
bool &GetDayNightCycle()
const
79 void SetDayNightCycle(
const bool &active);
88 UFUNCTION(BlueprintCallable, Category =
"Weather")
93 static
void FillSkyPostProcessFallback(class UPostProcessComponent* PostProcessComponent);
103 static
bool SetSkyLightMap(UWorld* World, class UTextureCube* Cubemap,
float Intensity);
107 static
void ClearSkyLightMap(UWorld* World);
109 static
bool HasSkyLightMap();
114 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
override;
117 UFUNCTION(BlueprintImplementableEvent)
122 virtual
void Tick(
float DeltaSeconds) override;
123 virtual
void BeginPlay() override;
124 virtual
void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
126 UParticleSystemComponent* CreateRainEmitter(
AActor* Owner,
bool bSensor);
127 void CheckWeatherPostProcessEffects();
130 class UMaterialParameterCollection* RainParameters =
nullptr;
133 UParticleSystem* RainTemplate =
nullptr;
136 UParticleSystemComponent* ViewportRain =
nullptr;
148 void PushWeatherToSky();
157 void UpdateStreetLightsForDayNight();
159 UPROPERTY(EditAnywhere, Category="Parameters")
163 UMaterial* PrecipitationPostProcessMaterial;
166 UMaterial* DustStormPostProcessMaterial;
168 TMap<UMaterial*,
float> ActiveBlendables;
170 UPROPERTY(EditAnywhere, Category = "
Weather")
171 bool DayNightCycle = true;
173 uint64 ApplySerial = 0u;