Failed to spawn playercontroller after hotreloading

I’m unable to spawn with my playercontroller when changes to the class have been C++ hotreloaded. The hotreload is successful and doesn’t include changes relevant to spawning itself. After restarting the editor the player spawns just fine again.

Hey -

What happens when you attempt to spawn after a hot reload? What changes were made prior to the hot reload. Any additional information you can provide about what exactly is happening will help me test and reproduce the issue.


Error: Couldn’t spawn player: Failed to spawn player controller.

To trigger this, I simply removed one function from the player controller class. (a commandline function to suicide the player with no further connection to anything in the engine/game) which causes above error after hot reload.

I find this happens for more classes too, including GameState and changed make in GameMode cause similar issues where entire features simply break down (eg. a time of day stops working entirely, purely because of the hot reload and not the actual code change)


Hey -

Are you seeing this error message in the output log or somewhere else? I created class based on player controller and added a blueprint based on it (controllerBP). After checking that I could play in editor with the new controllerBP I added a variable to the class to trigger a hot reload on compile. After the hot reload I was still able to play in editor. Can you confirm that what you’re seeing also happens in a new project and list the steps that caused it if so?

I get the message as an error on-screen.

Could you try adding/removing functions to the C++ controller, that’s what triggered it for me.

Hey -

What classes were you adding/removing from the class? I tried adding a void function and compile but still did not get any error on play. Can you post the code that you were working on when the error occurred?

I added/remove “suicide” functions (with a replicated ServerSuicide() etc. like ShooterGame) from SPlayerController.

Perhaps it’s easier to try with my project instead: .com/tomlooman/EpicSurvivalGameSeries

I run it on 4.7.3

Hi ,

I first grabbed your project and attempted to reproduce the issue in 4.7.6 and didn’t run into the issue you were having. After using the github source build for 4.7.3 however, I had the exact issue as described. Could you try making a copy and converting the project to 4.7.6 to see if the issue persists?

Downloaded 4.7.6 and that does seem to work! I’ll do some more testing this week, but you can regard this as fixed at this time!

Thank you!