Update Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Settings/CarlaSettingsDelegate.cpp

Co-authored-by: Xavier Solé Nogués <xavisolesoft@gmail.com>
This commit is contained in:
Blyron 2024-04-11 14:55:28 +02:00 committed by Xavier Solé Nogués
parent 12e8de0d84
commit fbc7751a73
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ void UCarlaSettingsDelegate::RegisterSpawnHandler(UWorld *InWorld)
void UCarlaSettingsDelegate::OnActorSpawned(AActor *InActor)
{
check(CarlaSettings != nullptr);
if (InActor != nullptr && IsValid(InActor) &&
if (IsValid(InActor) &&
!InActor->IsA<AInstancedFoliageActor>() && // foliage culling is
// controlled per instance
!InActor->IsA<ALandscape>() && // dont touch landscapes nor roads