Apply fix for Sensor as Marcel implemented (#8344)

This commit is contained in:
Blyron 2024-11-06 15:25:27 +01:00 committed by GitHub
parent c37d00d671
commit 2b2a2a1b83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -710,10 +710,12 @@ void ASceneCaptureSensor::BeginPlay()
UpdatePostProcessConfig(PostProcessConfig);
CaptureComponent2D->ShowFlags = PostProcessConfig.EngineShowFlags;
CaptureComponent2D->PostProcessSettings = PostProcessConfig.PostProcessSettings;
// This ensures the camera is always spawning the raindrops in case the
// weather was previously set to have rain.
GetEpisode().GetWeather()->NotifyWeather(this);
auto Weather = GetEpisode().GetWeather();
if (Weather != nullptr)
Weather->NotifyWeather(this);
Super::BeginPlay();
}