In my main menu game mode, the default pawn class is set to None. However, the game still tries to spawn the actor, or at least it checks if the actor is valid, because it logs the following warning:
Warning: SpawnActor failed because no class was specified
Which function do I need to override to prevent this ?
Hello! The warning shouldn’t be breaking anything. It’s just trying to tell you that you currently have no pawn being spawned. If your functionality works without it, the game should run fine. This functionality should be happening in C++ code, but I would not suggest trying to adjust it as it engine code in the GameModeBase class.
Here is the function in GameModeBase.cpp it tries to spawn the pawn class and then place it at a player start for reference though.
If you really think you need to change it, then you can have your child Game Mode class override the ChoosePlayerStart function and try to adjust the process from there.
My mistake. The actual spawning seems to happen in the SpawnDefaultPawnAtTransform
Either way, adjusting one of these functions should give you the resolution you need.