From 2a5b86d2cc771864576a81ba3c0118b7e9860283 Mon Sep 17 00:00:00 2001 From: rowechien Date: Thu, 2 Jan 2020 14:08:10 +0800 Subject: [PATCH] fix compile errors --- Plugins/UnLua/Source/UnLua/Private/LuaContext.cpp | 10 +++++++++- Plugins/UnLua/Source/UnLua/Private/LuaContext.h | 4 ++++ TPSProject.uproject | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Plugins/UnLua/Source/UnLua/Private/LuaContext.cpp b/Plugins/UnLua/Source/UnLua/Private/LuaContext.cpp index 508e6fb7..91dbf570 100644 --- a/Plugins/UnLua/Source/UnLua/Private/LuaContext.cpp +++ b/Plugins/UnLua/Source/UnLua/Private/LuaContext.cpp @@ -432,7 +432,11 @@ bool FLuaContext::TryToBindLua(UObjectBaseUtility *Object) /** * Callback for FWorldDelegates::OnWorldTickStart */ +#if ENGINE_MINOR_VERSION > 23 +void FLuaContext::OnWorldTickStart(UWorld *World, ELevelTick TickType, float DeltaTime) +#else void FLuaContext::OnWorldTickStart(ELevelTick TickType, float DeltaTime) +#endif { if (!Manager) { @@ -470,7 +474,11 @@ void FLuaContext::OnWorldCleanup(UWorld *World, bool bSessionEnded, bool bCleanu { bIsInSeamlessTravel = World->IsInSeamlessTravel(); } +#if ENGINE_MINOR_VERSION > 23 + Cleanup(IsEngineExitRequested(), World); // clean up +#else Cleanup(GIsRequestingExit, World); // clean up +#endif #if WITH_EDITOR int32 Index = LoadedWorlds.Find(World); @@ -858,7 +866,7 @@ void FLuaContext::NotifyUObjectCreated(const UObjectBase *InObject, int32 Index) { Actor = Cast(Object->GetOuter()); } - if (Actor && Actor->Role >= ROLE_AutonomousProxy) + if (Actor && Actor->GetLocalRole() >= ROLE_AutonomousProxy) { CandidateInputComponents.AddUnique((UInputComponent*)InObject); if (!FWorldDelegates::OnWorldTickStart.IsBoundToObject(this)) diff --git a/Plugins/UnLua/Source/UnLua/Private/LuaContext.h b/Plugins/UnLua/Source/UnLua/Private/LuaContext.h index b984d813..03ac424b 100644 --- a/Plugins/UnLua/Source/UnLua/Private/LuaContext.h +++ b/Plugins/UnLua/Source/UnLua/Private/LuaContext.h @@ -45,7 +45,11 @@ class FLuaContext : public FUObjectArray::FUObjectCreateListener, public FUObjec void AddLibraryName(const TCHAR *LibraryName) { LibraryNames.Add(LibraryName); } void AddModuleName(const TCHAR *ModuleName) { ModuleNames.AddUnique(ModuleName); } +#if ENGINE_MINOR_VERSION > 23 + void OnWorldTickStart(UWorld *World, ELevelTick TickType, float DeltaTime); +#else void OnWorldTickStart(ELevelTick TickType, float DeltaTime); +#endif void OnWorldCleanup(UWorld *World, bool bSessionEnded, bool bCleanupResources); void OnPostWorldCleanup(UWorld *World, bool bSessionEnded, bool bCleanupResources); void OnPreWorldInitialization(UWorld *World, const UWorld::InitializationValues); diff --git a/TPSProject.uproject b/TPSProject.uproject index e02aee58..9ea8f843 100644 --- a/TPSProject.uproject +++ b/TPSProject.uproject @@ -1,6 +1,6 @@ { "FileVersion": 3, - "EngineAssociation": "{9F029042-456B-2495-DEBD-0683CFBC8BAD}", + "EngineAssociation": "{1335008A-4A94-9923-CF89-B6A5C67488F7}", "Category": "", "Description": "", "Modules": [