Skip to content

Commit

Permalink
Fix tick function registering macro
Browse files Browse the repository at this point in the history
  • Loading branch information
nxrighthere committed Aug 4, 2020
1 parent 9f73d1a commit 102787d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
File renamed without changes.
12 changes: 6 additions & 6 deletions Source/Native/Source/UnrealCLR/Private/UnrealCLR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

DEFINE_LOG_CATEGORY(LogUnrealCLR);

#define UNREALCLR_REGISTER_TICK_FUNCTION(Function) {\
#define UNREALCLR_REGISTER_TICK_FUNCTION(Function, Group) {\
Function.bCanEverTick = true;\
Function.bTickEvenWhenPaused = false;\
Function.bStartWithTickEnabled = true;\
Function.bHighPriority = true;\
Function.bAllowTickOnDedicatedServer = true;\
Function.TickGroup = TG_PrePhysics;\
Function.TickGroup = Group;\
Function.RegisterTickFunction(UnrealCLR::Engine::World->PersistentLevel);\
}

Expand Down Expand Up @@ -1025,10 +1025,10 @@ void UnrealCLR::Module::OnWorldInitializedActors(const UWorld::FActorsInitialize
UnrealCLR::LoadAssemblies();
UnrealCLR::Status = UnrealCLR::StatusType::Running;

UNREALCLR_REGISTER_TICK_FUNCTION(OnPrePhysicsTickFunction);
UNREALCLR_REGISTER_TICK_FUNCTION(OnDuringPhysicsTickFunction);
UNREALCLR_REGISTER_TICK_FUNCTION(OnPostPhysicsTickFunction);
UNREALCLR_REGISTER_TICK_FUNCTION(OnPostUpdateTickFunction);
UNREALCLR_REGISTER_TICK_FUNCTION(OnPrePhysicsTickFunction, TG_PrePhysics);
UNREALCLR_REGISTER_TICK_FUNCTION(OnDuringPhysicsTickFunction, TG_DuringPhysics);
UNREALCLR_REGISTER_TICK_FUNCTION(OnPostPhysicsTickFunction, TG_PostPhysics);
UNREALCLR_REGISTER_TICK_FUNCTION(OnPostUpdateTickFunction, TG_PostUpdateWork);
} else {
#if WITH_EDITOR
FNotificationInfo notificationInfo(FText::FromString(TEXT("UnrealCLR host is not initialized! Please, check logs and try to restart the engine.")));
Expand Down

0 comments on commit 102787d

Please sign in to comment.