PlayerController BeginPlay on Client not called

Hi, I am pretty new on Unreal Engine and multiplayer

So I have custom Gamemode with attached custom PlayerController
I am running the game in Net Mode Play as Client with 2 players

I have two overrided functions PostInitializeComponents and BeginPlay in PlayerController

PostInitializeComponents called four times:
PlayerController0 - NM_DedicatedServer, NM_Client
PlayerController1 - NM_DedicatedServer, NM_Client

But BeginPlay only called twice on Server and NetMode returns NM_DedicatedServer

I am using Unreal Engine 5.2.1 What can be a problem. I want to create UMG Widget on client but I don’t think that it should be created on PostInitializeComponents.

I searched everywhere and I am even thinking that I need to create UMGs on PlayerState but that is weird

Should I consider to change version of Unreal Engine? But on some topics they say that after recreating project begin play working fine. Maybe it’s just a version of Unreal Engine 5.2.1 that is still buggy?

The HUD class is dedicated for UMGs. Probably the best place to put them, it’s managed.

Okay. I fixed it. I don’t how. But here’s my actions.

Before opening my project it was long ago until I open it I updated my engine from 5.2 to 5.2.1

So I worked with this version about 3-4 hours. And when problem of the topic has been raised I updated Rider. Yeah, I don’t think that it’s fixes my problem

Secondly, I opened Unreal Engine just using Launch button on Epic Games Launcher. It did some prerequisites, maybe that was needed before actually opening my project.

And then I have built my project again and it took like 15-30 min and now Begin Play now working both on Client and on Server. I don’t how, but this is really weird

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.