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.
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.
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.
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.
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
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.
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:
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
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.