Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Unreal/Plugins/AirSim/Source/AirBlueprintLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#include "AssetRegistry/AssetRegistryModule.h"
#include "DetectionComponent.h"
#include "CineCameraComponent.h"
#include "AssetRegistry/AssetData.h"
#include "RawIndexBuffer.h"
#include "StaticMeshResources.h"
#include "Engine/Blueprint.h"

/*
//TODO: change naming conventions to same as other files?
Expand Down
2 changes: 1 addition & 1 deletion Unreal/Plugins/AirSim/Source/AirSim.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private bool LoadAirSimDependency(ReadOnlyTargetRules Target, string LibName, st
private bool AddLibDependency(string LibName, string LibPath, string LibFileName, ReadOnlyTargetRules Target, bool IsAddLibInclude)
{
string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Mac) ? "x64" : "x86";
string ConfigurationString = (Target.Configuration == UnrealTargetConfiguration.Debug) ? "Debug" : "Release";
string ConfigurationString = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.Type == TargetType.Editor) ? "Debug" : "Release";
bool isLibrarySupported = false;


Expand Down
4 changes: 2 additions & 2 deletions Unreal/Plugins/AirSim/Source/PawnSimApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion Unreal/Plugins/AirSim/Source/RenderRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion Unreal/Plugins/AirSim/Source/SimHUD/SimHUD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<APawn> pawn = player_controller->GetPawn();
if (pawn) {
std::string pawn_name = std::string(TCHAR_TO_ANSI(*pawn->GetName()));
Utils::log(pawn_name);
Expand Down
1 change: 1 addition & 0 deletions Unreal/Plugins/AirSim/Source/SimMode/SimModeBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "common/StateReporterWrapper.hpp"
#include "LoadingScreenWidget.h"
#include "UnrealImageCapture.h"
#include "AssetRegistry/AssetData.h"
#include "SimModeBase.generated.h"

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FLevelLoaded);
Expand Down
4 changes: 3 additions & 1 deletion Unreal/Plugins/AirSim/Source/WorldSimApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "Runtime/Engine/Classes/Engine/Engine.h"
#include "Misc/OutputDeviceNull.h"
#include "ImageUtils.h"
#include "Engine/Blueprint.h"
#include "AssetRegistry/AssetData.h"
#include <cstdlib>
#include <ctime>
#include <algorithm>
Expand Down Expand Up @@ -790,7 +792,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);
Expand Down