Blueprint GameMode based off GameMode C++ class not calling BeginPlay or using playercontrollers or hud until Open Full Blueprint editor was opened and activated the Event BeginPlay node.
Hello ,
Can you please give more details on what you have in your Event BeginPlay and your overall setup? I tried reproducing this by doing the following:
- Created a fresh C++ project
- Added a C++ GameModeBase class (which is what should be used now rather than GameMode itself in 4.14)
- Added a BeginPlay override and had the BeginPlay function print a log message
- Created a blueprint based off of my custom C++ GameModeBase class
- Without opening the blueprint, made it the default game mode in Project Settings > Maps & Modes
- Hit Play
And at this point, the log message was printed successfully. Please let me know if there is something different that is being done here that could be causing the issue.
Ok ill go over what Ive found
- New Project Third Person C++
- create Player blueprint from Character C++
- create Player Controller blueprint from PlayerController C++
- create HUD blueprint from HUD C++
- create Custom Gamemode blueprint from GameMode C++
- in CustomGameMode blueprint change defaults to use above listed blueprints
launch game
observance - Correct Character, Player controller and HUD “NOT” working using printstrings on each connected to the BeginPlay Nodes inside each blueprint class. Set BreakPoints as well no breaks reported.
Open GameMode blueprint and click OPEN FULL BLUEPRINT EDITOR
again Launch game still same results (BeginPlay node is greyed out)
Open GameMode blueprint add connection to BeginPlay node to print string
Launch Game everything works and is responding as expected.
is this C++ class (GameMode) depreciated ? should I use the GameModeBase ONLY now?
Thank you for that explanation. After reproducing this, it seems that the changes made to the GameMode class’ classes cause it to be compiled automatically upon hitting Play. Be sure that your GameMode is being saved/compiled after you make changes to things such as HUD Class or Default Pawn Class.
Can you try this reproduction again but with compiling the GameMode BP after making these changes?
We haven’t heard from you in a while, . Are you still experiencing these issues? If so, can you try what I mentioned in my previous post? In the meantime, I’ll be marking this issue as resolved for tracking purposes.