Blueprint PlayerCameraManager causes Event Begin Play to not fire

Using release 4.15.0

When hitting “play” in the editor, the Event Begin Play event no longer fires on PlayerController, GameMode, or Pawn classes configured for the level. (Haven’t checked other classes.)

Reproduction path:

  1. Start a new project as empty blueprint.
  2. Create BP_GameMode as gamemode
  3. Create BP_PlayerController as playercontroller, make it print in event begin play
  4. Configure the BP_PlayerController as the player controller in the gamemode
  5. Configure the BP_GameMode as the default game mode in project settings and build/save
  6. At this point, it will still fire the event begin play
  7. Create BP_PlayerCameraManager as playercameramanager
  8. Assign BP_PlayerCameraManager as the camera manager for BP_PlayerController and build/save
  9. At this point, you will not see the event begin play fire

And, here comes the super curious bit:

  1. Re-set the player camera manager back to None in BP_PlayerController
  2. Delete the BP_PlayerCameraManager class from the project
  3. Save/build
  4. It still doesn’t get the begin play events

It’s like something in assigning a custom player camera manager permanently messes up the project. Which is … I have a hard time explaining how that could even happen.

FWIW, I tried stepping through play-in-editor in Visual Studio (pulling source for release 4.15.0 from GitHub) and there’s no obvious exception getting thrown. The ReceiveBeginPlay() function gets called on each actor. However, when the PlayerCameraManager blueprint is created, the blueprint events stop firing. Bizarre.

I would suspect that perhaps something in the blueprint-ization of PlayerCameraManager is wrong, and ends up invalidating / corrupting the blueprint event dispatch? That’s kind-of vague, I know, but that’s about as far as I can get without diving way deeper into the implementation internals than I’m able to at this time.

Hello jwatte,

I was not able to reproduce your issue with the steps provided, I have a couple questions that will help me narrow down your issue:

  1. Can you reproduce this error in a clean project on your machine?
  2. Could you provide screenshots of your project that this issue is occurring in?
  3. Are you using a GameMode Base or a GameMode?

Thanks!

,
Thanks for the answer.
Yes, I can reproduce this in a clean project – just did when writing down the steps.
I’m using a GameMode subclass IIRC.
I’m going to try this on my second machine and see if it still happens.
And if it does, I’ll see if I can get ShadowPlay to record the whole thing.

Okay, I take back blaming the PlayerCameraManager – it seems to actually be a custom BP_GameState (based on the GameState base class) that does it.

I’m having loads of issues as well in 4.15.

Normally, in a totally new project, I make the gamemode, player pawn, and controller. I set the gamemmode to use pawn/controller, then I set the project to use my gamemode. I hit play, I spawn, all is well! I’ve done this millions of times by now.

Now… NOTHING works!

Your issue seems to be a conflict between having a gamemode base and then not using a GameState base, not using the same types can cause a conflict where the event begin play will not fire. I was able to achieve the results of your issue when I had a GameMode base and then made a custom GameState that was not a GameState base.

So that seems like the answer. I’d assume that the engine should recognize this problem, and warn.
Why are there even two different kinds?

Gamemode and GameState without the bases are designed to behave like a multiplayer match, which means that if the two don’t match up (ie the gamemode is gamemode base, and the other is gamestate) The game will wait for the “multiplayer match to start” before running an event begin play match.