Event BeginPlay suddenly not firing anymore any any blueprint

Hello. My project worked fine before, but when I tried playtesting my project today after making some changes I noticed that nothing was working on start up.

When debugging a bit I noticed that none of my EventBeginPlays are firing, not the gamemode, level, or any other blueprint for that matter. All other Events like tick or Gamepad sticks still work.
The only error I get is from my PlayerController BP, since it doesn’t get assigned any pawn references.

I have my custom gamemode set in my project settings and world settings.

When I run my game with a breakpoint set on my GameMode BeginPlay event I get the following result. As you can see, it never breaks. It does create a new camera and playercontroller by default. Normally these would be removed in my gamemode as I create all the required pieces myself from script.

All other events do fire, like keyboard or gamepad input:

Before all of this stopped working I was following an Unreal tutorial where I had to create a custom GameState blueprint. I did this and assigned it in my options. When I playtested then I noticed nothing was working, so I backtracked, removing the GameState BP as well as changing the GameState back to default, but to no avail.

When I change the GameMode back to the default setting all of my BeginPlays fire again.

I’m kind of at a loss here on what to do. I looked over most questions related to something like this, but none really applied to what my issue is.

1 Like

I already found the answer.

Under my Custom gamemode blueprint I changed the GameState to GameState. By default this is GameStateBase. Changing it back to this solved my issue.

7 Likes

Hey, thanks for commenting. I also just found the answer to my issue. I did set the gamemode in both the projectsettings and would outliner. What I did wrong however is the GameState. I changed this to a GameState bleuprint, it should be a GameStateBase.

1 Like

Did you change your gamemode to be the Default Gamemode in the Project Settings? cause you should set it both in Project Settings AND World Settings. Hope this helps

Just to add to this, in my case I had created a custom gamestate with GameState as the parent instead of GameStateBase. Reparenting the Gamestate blueprint fixed it right up. Quite annoying, but there it is.

2 Likes

I had the same issue today. Super confused when “Event Begin Play” wasn’t firing. Cheers

Just run into the same problem and realized the GameState and GameMode must be from the same “type” like GameStateBase + GameModeBase OR GameState + GameMode but no mixes - yes, it does matter :slight_smile:

3 Likes

this fixed my issue!

yes, thank you!

THANK YOU! I too made the mistake of creating a GameState class instead of a GameStateBase

dave_sillivan needs to post his comment as the answer. Dragon getting all the glory but its daves answer that is the solution lol.

I had a similar problem, the beginplay was not firing on the parent class for any actor, and I use c++ in addition to blueprints.

The solution was to go to my child class’s begin play, right click, “Add call to parent function” and that newly created node to the child’s begin play.

1 Like

Thanks so much for this, been driving me nuts.

This fixed my issue! thanks for posting

Had the same problem with a BP, which was a child of a C++ Class. Using “Add call to parent function” in the BP did not work for me, but removing the “BeginPlay” from C++ and only using it in the BP worked.

Edit: It seems like the C++ Method just needs to call Super::BeginPlay() for it to work without problems.

Now the C++ Method + the BPs “BeginPlay” gets called correctly:

void AResourceDeposit::BeginPlay()
{
	Super::BeginPlay();
	currentResourceAmount = maxResourceAmount;
	UpdateAllowHarvesting(allowHarvesting);
}

image

1 Like

Having GameMode and GameState consistent, thus having them both as either a “Base” or regular class fixed it for me.

However, since I reparented all my classes to the regular ones instead of the “…Base” classes, my default PlayerStart is ignored and the Player spawns on 0,0,0

Thank you sir, you just saved me.

My problem was not having the Parent: Begin Play node in my child class, which was causing the begin play in my parent class to get overridden and not fire.

image