Download

BeginPIE not firing?

I’m trying to use FEditorDelegates::BeginPIE, but it never seems to fire. PostPIEStarted works fine, which leads me to believe this is a bug… I’m calling it from an overridden UGameInstance::Init, as such:

void UTestGameInstance::Init()
{
	Super::Init();

#if WITH_EDITOR
	FEditorDelegates::BeginPIE.AddUObject(this, &UTestGameInstance::PlayInEditorBegin);
#endif
}

void UTestGameInstance::PlayInEditorBegin(bool bIsSimulating)
{
	UE_LOG(LogTemp, Warning, TEXT("BeginPIE"));
}

Could you try and see if it works with a more normal setup (like in an Actor?)

I’m thinking maybe the FEditorDelegates system isn’t fully set up at the time of UGameInstance::Init, which happens even before the GameMode is created. (nothing certain, just a suggestion).

It isn’t a bug the delegate has just already been broadcasted by the time Init is called where you bind it.