Skip to main content
Iris Replication: BeginPlay Issue in Unreal Engine 5.7

Iris Replication: BeginPlay Issue in Unreal Engine 5.7

·256 words·2 mins
Iris - This article is part of a series.
Part 4: This Article

Problem
#

Recently, I noticed a strange behavior: not all replicated actors placed in the level call BeginPlay on the client.

During the investigation, it turned out that Unreal Engine 5.7 introduced code that delays BeginPlay for actors spawned dynamically via SpawnActor(...). As a side effect, this logic also started affecting actors placed in the level. Depending on the replication order, some of them could end up never receiving BeginPlay.

Cause and Fix
#

The issue was introduced in this commit (June 26, 2025), and fixed in this commit (approximately two weeks ago).
The fix resolves a case where static actors were incorrectly marked as ActorIsPendingPostNetInit.

Current State
#

Until this fix makes it into an official Unreal Engine release, a small temporary solution is provided below to work around this issue.

[/Script/Engine.Engine]
WorldSettingsClassName=/Script/TheGame.TheGameWorldSettings
UCLASS()
class ATheGameWorldSettings : public AWorldSettings
{
	GENERATED_BODY()
public:
	void NotifyBeginPlay() override;
};
#include "Runtime/Launch/Resources/Version.h"
#include "EngineUtils.h"

void ATheGameWorldSettings::NotifyBeginPlay()
{
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION == 7
	UWorld* World = GetWorld();
	if (!World->GetBegunPlay())
		for (FActorIterator It(World); It; ++It)
			if (It->IsFullNameStableForNetworking())
				It->SetActorIsPendingPostNetInit(false);
#else
	#error Read and Check commet below
	// There is a regression in Iris replication that can prevent some replicated actors
	// from receiving BeginPlay on clients (actors may remain in PendingPostNetInit state).
	//
	// The regression was introduced by Epic in commit:
	//   https://github.com/EpicGames/UnrealEngine/commit/6796445b2fe87a50f253a770366c0a2631de3dbe
	//
	// And fixed later in commit:
	//   https://github.com/EpicGames/UnrealEngine/commit/ee50eb17d588f27536209620ed2c44b0b666f39a
	//
	// This version check is used to apply a workaround only for engine versions
	// where the fix is not yet present.
#endif

	Super::NotifyBeginPlay();
}
Iris - This article is part of a series.
Part 4: This Article