Manual weather support
This commit is contained in:
parent
5360f2045c
commit
f046812746
|
@ -126,7 +126,12 @@ void ACarlaGameModeBase::InitGame(
|
|||
UE_LOG(LogCarla, Error, TEXT("Missing CarlaSettingsDelegate!"));
|
||||
}
|
||||
|
||||
if (WeatherClass != nullptr) {
|
||||
AActor* WeatherActor =
|
||||
UGameplayStatics::GetActorOfClass(GetWorld(), AWeather::StaticClass());
|
||||
if (WeatherActor != nullptr) {
|
||||
UE_LOG(LogCarla, Log, TEXT("Existing weather actor. Doing nothing then!"));
|
||||
}
|
||||
else if (WeatherClass != nullptr) {
|
||||
Episode->Weather = World->SpawnActor<AWeather>(WeatherClass);
|
||||
} else {
|
||||
UE_LOG(LogCarla, Error, TEXT("Missing weather class!"));
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue