From dfa82771d6ebedf62815d6d2abb4002b0019e0e1 Mon Sep 17 00:00:00 2001 From: Angel Pons <22937129+Th3Fanbus@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:53:57 +0000 Subject: [PATCH] fix: Make colored instance mesh proxies visible in PIE The code already accounted for two editor use-cases, but was missing the PIE use-case. Replace the checks with `IsEditorWorld` as it's equivalent to having three discrete checks. --- CustomImplementations/FGColoredInstanceMeshProxy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CustomImplementations/FGColoredInstanceMeshProxy.cpp b/CustomImplementations/FGColoredInstanceMeshProxy.cpp index 1f21645a..52167872 100644 --- a/CustomImplementations/FGColoredInstanceMeshProxy.cpp +++ b/CustomImplementations/FGColoredInstanceMeshProxy.cpp @@ -1,6 +1,6 @@ bool UFGColoredInstanceMeshProxy::ShouldCreateRenderState() const { -#if WITH_EDITOR // Ensure visibility in blueprint & editor. - if (GetWorld()->WorldType == EWorldType::Editor || GetWorld()->WorldType == EWorldType::EditorPreview) { +#if WITH_EDITOR // Ensure visibility in blueprint, editor & PIE + if (GetWorld()->IsEditorWorld()) { return true; } #endif