diff --git a/Source/WidgetInteraction/Private/WidgetInteraction.cpp b/Source/WidgetInteraction/Private/WidgetInteraction.cpp index 1b7b6985c9efb15418a902b8ef068fdd51fab9b8..4b0c537f6a52ea85bc60eeea4b4a5a94ff8262db 100644 --- a/Source/WidgetInteraction/Private/WidgetInteraction.cpp +++ b/Source/WidgetInteraction/Private/WidgetInteraction.cpp @@ -23,9 +23,9 @@ void FWidgetInteractionModule::ShutdownModule() void FWidgetInteractionModule::OnWorldTickStart(ELevelTick level_tick, float val) { - //called every Tick() - - auto worlds = GEngine->GetWorldContexts(); + //since OnWorldTickStart is called independent of the world/level we are in, + //we need to check whether the level changed and, if so, reattach the interaction component + auto worlds = GEngine->GetWorldContexts(); for (auto world_context : worlds) {