Skip to content
6 changes: 3 additions & 3 deletions AirLib/include/vehicles/car/api/CarRpcLibServer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ namespace airlib
return static_cast<CarApiBase*>(RpcLibServerBase::getVehicleApi(vehicle_name));
}
};

#endif
}
} //namespace
#endif

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ namespace msr
return static_cast<ComputerVisionApiBase*>(RpcLibServerBase::getVehicleApi(vehicle_name));
}
};

#endif
}
} //namespace
#endif

#endif
#endif
14 changes: 8 additions & 6 deletions Unreal/Plugins/AirSim/Source/Annotation/AnnotationComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@
// Overwrite the material

#include "Runtime/CoreUObject/Public/UObject/ConstructorHelpers.h"
#include "Runtime/Engine/Classes/Materials/Material.h"
#include "Runtime/Engine/Classes/Materials/MaterialInstanceDynamic.h"
#include "Runtime/Engine/Classes/Engine/StaticMesh.h"
#include "Runtime/Engine/Classes/Components/SkeletalMeshComponent.h"
#include "Runtime/Launch/Resources/Version.h"
#include "Runtime/Engine/Public/MaterialShared.h"
#include "Runtime/Engine/Classes/Engine/Engine.h"
#include "AirBlueprintLib.h"

#if ENGINE_MAJOR_VERSION < 5
#include "Runtime/Engine/Classes/Materials/Material.h"
#include "Runtime/Engine/Classes/Materials/MaterialInstanceDynamic.h"
#endif
#if ENGINE_MAJOR_VERSION >= 5
//different header files in UE
#include "Runtime/Engine/Public/Materials/Material.h"
#include "Runtime/Engine/Public/Materials/MaterialInstanceDynamic.h"
#include "Runtime/Engine/Public/StaticMeshSceneProxy.h"
#include "Runtime/Engine/Public/SkeletalMeshSceneProxy.h"

#endif
#include "Runtime/Engine/Public/Rendering/SkeletalMeshRenderData.h"

Expand Down Expand Up @@ -370,14 +372,14 @@ FPrimitiveSceneProxy* UAnnotationComponent::CreateSceneProxy(USkeletalMeshCompon
{
UMaterialInterface* ProxyMaterial = AnnotationMID; // Material Instance Dynamic

ERHIFeatureLevel::Type SceneFeatureLevel = GetWorld()->FeatureLevel;
ERHIFeatureLevel::Type SceneFeatureLevel = GetWorld()->GetFeatureLevel();

// Ref: https://github.com/EpicGames/UnrealEngine/blob/4.19/Engine/Source/Runtime/Engine/Private/Components/SkinnedMeshComponent.cpp#L415
FSkeletalMeshRenderData* SkelMeshRenderData = SkeletalMeshComponent->GetSkeletalMeshRenderData();

// Only create a scene proxy for rendering if properly initialized
if (SkelMeshRenderData &&
SkelMeshRenderData->LODRenderData.IsValidIndex(SkeletalMeshComponent->PredictedLODLevel) &&
SkelMeshRenderData->LODRenderData.IsValidIndex(SkeletalMeshComponent->GetPredictedLODLevel()) &&
SkeletalMeshComponent->MeshObject) // The risk of using MeshObject
{
// Only create a scene proxy if the bone count being used is supported, or if we don't have a skeleton (this is the case with destructibles)
Expand Down
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ if [ "$(uname)" == "Darwin" ]; then
export CXX="$(brew --prefix)/opt/llvm/bin/clang++"
else
if $gcc; then
export CC="gcc-12"
export CXX="g++-12"
export CC="gcc"
export CXX="g++"
else
export CC="clang-12"
export CXX="clang++-12"
export CC="clang"
export CXX="clang++"
fi
fi

Expand Down
25 changes: 22 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,26 @@ else #linux
# wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
# sudo apt-get update
# fi
sudo apt-get install -y clang-12 clang++-12 libc++-12-dev libc++abi-12-dev libstdc++-12-dev
if [ "$VERSION" -eq "20" ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt-get install -y build-essential cmake clang clang-12 clang++-12 libc++-12-dev libc++abi-12-dev libstdc++-13-dev

# configure update-alternatives for clang
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 1000
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 1000
sudo update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-12 1000
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang++-12 1000
fi
if [ "$VERSION" -eq "22" ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt-get install -y build-essential cmake clang clang-14 clang++-14 libc++-14-dev libc++abi-14-dev libstdc++-13-dev
fi
if [ "$VERSION" -eq "24" ]; then
sudo apt-get install -y build-essential cmake clang clang-18 clang++-18 libc++-18-dev libc++abi-18-dev libstdc++-13-dev
fi

fi

if ! which cmake; then
Expand Down Expand Up @@ -86,7 +105,7 @@ else #linux
fi

# install additional tools
sudo apt-get install -y build-essential unzip libunwind-dev
sudo apt-get install -y unzip

if version_less_than_equal_to $cmake_ver $MIN_CMAKE_VERSION; then
# in ubuntu 18 docker CI, avoid building cmake from scratch to save time
Expand Down Expand Up @@ -190,4 +209,4 @@ set +x
echo ""
echo "******************************************"
echo "Cosys-AirSim setup completed successfully!"
echo "******************************************"
echo "******************************************"