From 7e42db5ab2efb4c216b3e8185b217eab6e0cb3c9 Mon Sep 17 00:00:00 2001 From: doterop Date: Thu, 19 Nov 2020 16:11:35 +0100 Subject: [PATCH] Fixed BP_Sky name overlap issue --- .../Plugins/Carla/Source/Carla/Util/ObjectRegister.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Util/ObjectRegister.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Util/ObjectRegister.cpp index 2378f7f6a..299f64602 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Util/ObjectRegister.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Util/ObjectRegister.cpp @@ -43,8 +43,9 @@ void UObjectRegister::RegisterObjects(TArray Actors) { const FString ActorName = Actor->GetName(); - // Discard Sky to not broke the global ilumination - if(ActorName.Contains("BP_Sky")) continue; + FString ClassName = Actor->GetClass()->GetName(); + // Discard Sky to not break the global ilumination + if(ClassName.Equals("BP_Sky_C")) continue; ACarlaWheeledVehicle* Vehicle = Cast(Actor); if (Vehicle)