diff --git a/Unreal/Plugins/AirSim/Source/PawnSimApi.cpp b/Unreal/Plugins/AirSim/Source/PawnSimApi.cpp index 9fa99abaab..c5e9a5a604 100644 --- a/Unreal/Plugins/AirSim/Source/PawnSimApi.cpp +++ b/Unreal/Plugins/AirSim/Source/PawnSimApi.cpp @@ -293,12 +293,12 @@ bool PawnSimApi::testLineOfSightToPoint(const msr::airlib::GeoPoint& lla) const if (hit) { // No LOS, so draw red line FLinearColor color{ 1.0f, 0, 0, 0.4f }; - params_.pawn->GetWorld()->LineBatcher->DrawLine(params_.pawn->GetActorLocation(), target_location, color, SDPG_World, 10, -1); + params_.pawn->GetWorld()->GetLineBatcher(UWorld::ELineBatcherType::World)->DrawLine(params_.pawn->GetActorLocation(), target_location, color, SDPG_World, 10, -1); } else { // Yes LOS, so draw green line FLinearColor color{ 0, 1.0f, 0, 0.4f }; - params_.pawn->GetWorld()->LineBatcher->DrawLine(params_.pawn->GetActorLocation(), target_location, color, SDPG_World, 10, -1); + params_.pawn->GetWorld()->GetLineBatcher(UWorld::ELineBatcherType::World)->DrawLine(params_.pawn->GetActorLocation(), target_location, color, SDPG_World, 10, -1); } } }, diff --git a/Unreal/Plugins/AirSim/Source/RenderRequest.cpp b/Unreal/Plugins/AirSim/Source/RenderRequest.cpp index e56ca87818..85ae329eef 100644 --- a/Unreal/Plugins/AirSim/Source/RenderRequest.cpp +++ b/Unreal/Plugins/AirSim/Source/RenderRequest.cpp @@ -144,7 +144,7 @@ void RenderRequest::ExecuteTask() FRHICommandListImmediate& RHICmdList = GetImmediateCommandList_ForRenderCommand(); auto rt_resource = params_[i]->render_target->GetRenderTargetResource(); if (rt_resource != nullptr) { - const FTexture2DRHIRef& rhi_texture = rt_resource->GetRenderTargetTexture(); + const FTextureRHIRef& rhi_texture = rt_resource->GetRenderTargetTexture(); FIntPoint size; auto flags = setupRenderResource(rt_resource, params_[i].get(), results_[i].get(), size); diff --git a/Unreal/Plugins/AirSim/Source/SimHUD/SimHUD.cpp b/Unreal/Plugins/AirSim/Source/SimHUD/SimHUD.cpp index 147e9ec8ef..93ee77f456 100644 --- a/Unreal/Plugins/AirSim/Source/SimHUD/SimHUD.cpp +++ b/Unreal/Plugins/AirSim/Source/SimHUD/SimHUD.cpp @@ -152,7 +152,7 @@ void ASimHUD::createMainWidget() //create main widget if (widget_class_ != nullptr) { APlayerController* player_controller = this->GetWorld()->GetFirstPlayerController(); - auto* pawn = player_controller->GetPawn(); + TObjectPtr pawn = player_controller->GetPawn(); if (pawn) { std::string pawn_name = std::string(TCHAR_TO_ANSI(*pawn->GetName())); Utils::log(pawn_name); diff --git a/Unreal/Plugins/AirSim/Source/WorldSimApi.cpp b/Unreal/Plugins/AirSim/Source/WorldSimApi.cpp index 527d6410a4..ffd97f6852 100644 --- a/Unreal/Plugins/AirSim/Source/WorldSimApi.cpp +++ b/Unreal/Plugins/AirSim/Source/WorldSimApi.cpp @@ -790,7 +790,7 @@ bool WorldSimApi::testLineOfSightBetweenPoints(const msr::airlib::GeoPoint& lla1 color = FLinearColor{ 0, 1.0f, 0, 0.4f }; } - simmode_->GetWorld()->PersistentLineBatcher->DrawLine(point1, point2, color, SDPG_World, 4, 999999); + simmode_->GetWorld()->GetLineBatcher(UWorld::ELineBatcherType::WorldPersistent)->DrawLine(point1, point2, color, SDPG_World, 4, 999999); } }, true);