How to call a function from level blueprint inside c++?

Hello!

How to call a function from level blueprint inside c++?

I have function in level blueprint:

http://joxi.ru/Vm6ylvgUxvzB1r.jpg

And C++ code:

.h

	UFUNCTION(BlueprintCallable, Category = Menu)
	static void CallTimeUpMenuFunction(AActor* actor);

.cpp

void AGHTimer::TimerBody()
{
	AGHTimer::Time--;

	if (AGHTimer::Time == 0)
	{
		CallTimeUpMenuFunction(this);		
	}
}

void AGHTimer::CallTimeUpMenuFunction(AActor* actor)
{

	FOutputDeviceNull ar;
	actor->GetLevel()->CallFunctionByNameWithArguments(TEXT("ShowTimeUpMenu"), ar, NULL, true);
}

And this doesn’t work. Menu not showing :frowning:
What is the problem?

In case you are still looking for an answer to this question; you have to call the function in the levelscriptactor within the level, not the level itself. Something like this:

actor->GetLevel()->GetLevelScriptActor()->CallFunctionByNameWithArguments(TEXT("ShowTimeUpMenu"), ar, NULL, true);