diff --git a/Source/RealtimeMeshComponent/Private/RealtimeMeshCollisionLibrary.cpp b/Source/RealtimeMeshComponent/Private/RealtimeMeshCollisionLibrary.cpp index ab2766b6..aed497be 100644 --- a/Source/RealtimeMeshComponent/Private/RealtimeMeshCollisionLibrary.cpp +++ b/Source/RealtimeMeshComponent/Private/RealtimeMeshCollisionLibrary.cpp @@ -8,7 +8,6 @@ #include "PhysicsEngine/BodySetup.h" #include "PhysicsEngine/PhysicsSettings.h" - bool URealtimeMeshCollisionTools::FindCollisionUVRealtimeMesh(const FHitResult& Hit, int32 UVChannel, FVector2D& UV) { bool bSuccess = false; @@ -73,7 +72,8 @@ void URealtimeMeshCollisionTools::CookConvexHull(FRealtimeMeshCollisionConvex& C #if RMC_ENGINE_ABOVE_5_4 return Chaos::FConvexPtr(new FConvex(ConvexVertices, 0.0f)); #else - return MakeShared(ConvexVertices, 0.0f).ToSharedPtr(); + TSharedPtr convexPtr = MakeShared(ConvexVertices, 0.0f); + return convexPtr; #endif }; diff --git a/Source/RealtimeMeshComponent/Private/RealtimeMeshComponent.cpp b/Source/RealtimeMeshComponent/Private/RealtimeMeshComponent.cpp index e394ab96..b80d644c 100644 --- a/Source/RealtimeMeshComponent/Private/RealtimeMeshComponent.cpp +++ b/Source/RealtimeMeshComponent/Private/RealtimeMeshComponent.cpp @@ -3,7 +3,9 @@ #include "RealtimeMeshComponent.h" #include "GameDelegates.h" +#if RMC_ENGINE_ABOVE_5_2 #include "MaterialDomain.h" +#endif #include "NaniteVertexFactory.h" #include "RealtimeMeshComponentModule.h" #include "RenderProxy/RealtimeMeshComponentProxy.h" diff --git a/Source/RealtimeMeshComponent/Private/RenderProxy/RealtimeMeshProxyCommandBatch.cpp b/Source/RealtimeMeshComponent/Private/RenderProxy/RealtimeMeshProxyCommandBatch.cpp index e7e7af09..f97df732 100644 --- a/Source/RealtimeMeshComponent/Private/RenderProxy/RealtimeMeshProxyCommandBatch.cpp +++ b/Source/RealtimeMeshComponent/Private/RenderProxy/RealtimeMeshProxyCommandBatch.cpp @@ -119,7 +119,8 @@ namespace RealtimeMesh Proxy->EnqueueCommandBatch(MoveTemp(Tasks), ThreadState); - DoOnGameThread([ThreadState, MeshWeak = Mesh.ToWeakPtr(), bRecreateProxies = static_cast(bRequiresProxyRecreate)]() + TWeakPtr meshWeak = Mesh; + DoOnGameThread([ThreadState, MeshWeak = meshWeak, bRecreateProxies = static_cast(bRequiresProxyRecreate)]() { if (bRecreateProxies) { diff --git a/Source/RealtimeMeshComponent/Private/RenderProxy/RealtimeMeshSectionGroupProxy.cpp b/Source/RealtimeMeshComponent/Private/RenderProxy/RealtimeMeshSectionGroupProxy.cpp index 2e0a06be..6a0c7389 100644 --- a/Source/RealtimeMeshComponent/Private/RenderProxy/RealtimeMeshSectionGroupProxy.cpp +++ b/Source/RealtimeMeshComponent/Private/RenderProxy/RealtimeMeshSectionGroupProxy.cpp @@ -2,7 +2,6 @@ #include "RenderProxy/RealtimeMeshSectionGroupProxy.h" -//#include "MaterialDomain.h" #include "RealtimeMeshComponentModule.h" #include "Data/RealtimeMeshShared.h" #include "RenderProxy/RealtimeMeshLODProxy.h" @@ -321,7 +320,9 @@ namespace RealtimeMesh FRayTracingGeometryInitializer Initializer; Initializer.DebugName = *(SharedResources->GetMeshName().ToString() + TEXT("_") + Key.ToString() + " RTGeometry"); +#if RMC_ENGINE_ABOVE_5_4 Initializer.OwnerName = SharedResources->GetMeshName(); +#endif Initializer.IndexBuffer = IndexStream->IndexBufferRHI; Initializer.IndexBufferOffset = IndexStream->IndexBufferRHI->GetStride() * MinIndex; diff --git a/Source/RealtimeMeshComponent/Public/Interface/Core/RealtimeMeshStreamRange.h b/Source/RealtimeMeshComponent/Public/Interface/Core/RealtimeMeshStreamRange.h index 23336f3f..8765df2a 100644 --- a/Source/RealtimeMeshComponent/Public/Interface/Core/RealtimeMeshStreamRange.h +++ b/Source/RealtimeMeshComponent/Public/Interface/Core/RealtimeMeshStreamRange.h @@ -5,6 +5,7 @@ #include "CoreFwd.h" #include "UObject/NameTypes.h" #include "Math/Range.h" +#include "RealtimeMeshInterfaceFwd.h" enum class ERealtimeMeshStreamType : uint8 { diff --git a/Source/RealtimeMeshTests/Private/FunctionalTests/RealtimeMeshStressTestActor.cpp b/Source/RealtimeMeshTests/Private/FunctionalTests/RealtimeMeshStressTestActor.cpp index 72c969f3..e61d47cc 100644 --- a/Source/RealtimeMeshTests/Private/FunctionalTests/RealtimeMeshStressTestActor.cpp +++ b/Source/RealtimeMeshTests/Private/FunctionalTests/RealtimeMeshStressTestActor.cpp @@ -3,7 +3,9 @@ #include "FunctionalTests/RealtimeMeshStressTestActor.h" +#if RMC_ENGINE_ABOVE_5_2 #include "MaterialDomain.h" +#endif #include "RealtimeMeshLibrary.h" #include "RealtimeMeshSimple.h" #include "Mesh/RealtimeMeshBasicShapeTools.h"