address a few ue 5.5 deprecation warnings

This commit is contained in:
Mamadou Babaei
2024-10-11 12:31:23 +02:00
parent b69bb080f6
commit f60fd2ff66
3 changed files with 24 additions and 3 deletions
@@ -54,8 +54,21 @@ UWorld* FSGEngineUtils::GetWorld()
if (IsValid(GEditor))
{
{
const bool bIsPIE = GPlayInEditorID != -1;
const int32 WorldPIEInstance = bIsPIE ? GPlayInEditorID : 1;
const bool bIsPIE =
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5
UE::GetPlayInEditorID()
#else /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5 */
GPlayInEditorID
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5 */
!= -1;
const int32 WorldPIEInstance = bIsPIE
?
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5
UE::GetPlayInEditorID()
#else /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5 */
GPlayInEditorID
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5 */
: 1;
const FWorldContext* WorldContext{GEditor->GetPIEWorldContext(WorldPIEInstance)};
if (WorldContext)
{