diff --git a/Source/RuntimeMeshComponent/Private/RuntimeMeshActor.cpp b/Source/RuntimeMeshComponent/Private/RuntimeMeshActor.cpp index 95c396c..f9ea6bf 100644 --- a/Source/RuntimeMeshComponent/Private/RuntimeMeshActor.cpp +++ b/Source/RuntimeMeshComponent/Private/RuntimeMeshActor.cpp @@ -11,7 +11,7 @@ ARuntimeMeshActor::ARuntimeMeshActor(const FObjectInitializer& ObjectInitializer : Super(ObjectInitializer) { -#if ENGINE_MAJOR_VERSION <= 4 && ENGINE_MINOR_VERSION <= 24 +#if ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION < 24 bCanBeDamaged = false; #else SetCanBeDamaged(false); diff --git a/Source/RuntimeMeshComponent/Private/RuntimeMeshComponentProxy.cpp b/Source/RuntimeMeshComponent/Private/RuntimeMeshComponentProxy.cpp index ca3791d..0eb7ab1 100644 --- a/Source/RuntimeMeshComponent/Private/RuntimeMeshComponentProxy.cpp +++ b/Source/RuntimeMeshComponent/Private/RuntimeMeshComponentProxy.cpp @@ -92,10 +92,10 @@ FPrimitiveViewRelevance FRuntimeMeshComponentSceneProxy::GetViewRelevance(const Result.bDrawRelevance = IsShown(View); Result.bShadowRelevance = IsShadowCast(View); - #if ENGINE_MINOR_VERSION >= 26 + #if ENGINE_MAJOR_VERSION >= 5 || (ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION >= 26) bool bForceDynamicPath = IsRichView(*View->Family) || IsSelected() || View->Family->EngineShowFlags.Wireframe; #else - bool bForceDynamicPath = IsRichView(*View->Family) || IsSelected() || View->Family->EngineShowFlags.Wireframe; + bool bForceDynamicPath = !IsStaticPathAvailable() || IsRichView(*View->Family) || IsSelected() || View->Family->EngineShowFlags.Wireframe; #endif Result.bStaticRelevance = !bForceDynamicPath && RuntimeMeshProxy->ShouldRenderStatic(); Result.bDynamicRelevance = bForceDynamicPath || RuntimeMeshProxy->ShouldRenderDynamic(); @@ -239,10 +239,10 @@ void FRuntimeMeshComponentSceneProxy::GetDynamicMeshElements(const TArray= 26 + #if ENGINE_MAJOR_VERSION >= 5 || (ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION >= 26) bool bForceDynamicPath = IsRichView(*Views[ViewIndex]->Family) || Views[ViewIndex]->Family->EngineShowFlags.Wireframe || IsSelected(); #else - bool bForceDynamicPath = IsRichView(*Views[ViewIndex]->Family) || Views[ViewIndex]->Family->EngineShowFlags.Wireframe || IsSelected(); + bool bForceDynamicPath = !IsStaticPathAvailable() || IsRichView(*Views[ViewIndex]->Family) || Views[ViewIndex]->Family->EngineShowFlags.Wireframe || IsSelected(); #endif if (IsShown(View) && (VisibilityMap & (1 << ViewIndex)))