Hey guys. I have also ran into this unfortunate problem. I believe this issue exists because CommonUI is originally made for Fortnite, which is an online game, which was never meant to be paused, so this bug just slipped away.
I don’t think you can workaround this without modifying plugin’s code. In my case, I moved this call from next-tick timer to world’s tick start, which is functionally a very similar thing, just a little more code than that.
If anyone is interested in how exactly to make this work during pause, here’s what I did:
- We are going to modify following two files:
Engine\Plugins\Experimental\CommonUI\Source\CommonUI\Private\Input\CommonBoundActionBar.h
Engine\Plugins\Experimental\CommonUI\Source\CommonUI\Private\Input\CommonBoundActionBar.cpp
- Add this to header file’s private section:
void OnDisplayRefreshRequested(UWorld* World, ELevelTick TickType, float DeltaSeconds);
FDelegateHandle RefreshHandle;
- Add this function to .cpp file:
void UCommonBoundActionBar::OnDisplayRefreshRequested(UWorld* World, ELevelTick TickType, float DeltaSeconds)
{
FWorldDelegates::OnWorldTickStart.Remove(RefreshHandle);
HandleDeferredDisplayUpdate();
}
- Remove this timer creation in .cpp
GameInstance->GetTimerManager().SetTimerForNextTick(FTimerDelegate::CreateUObject(this, &UCommonBoundActionBar::HandleDeferredDisplayUpdate));
- And add this worldtick-based call instead
RefreshHandle = FWorldDelegates::OnWorldTickStart.AddUObject(this, &UCommonBoundActionBar::OnDisplayRefreshRequested);
- Compile and run. Now action bar should properly get constructed even when game is paused.