When I run my project in the editor it always spawns an additional player object on its own at what seems like a random location (usually up in the air over the map). I’d like it to not do that.
I’m using an unusual method for generating the map, which may be related. I read from an outside file and then spawn in a bunch of actors, including the player character object that I actually want. I’m wondering if it’s spawning the extra player before that because it feels like it needs one.
Regardless, does anyone know if there’s a way that I can disable this behavior?
Yes, that could be related with how you spawn your player manually. GameMode handles spawning of PlayerControllers and Pawns automatically, if you didn’t change it.
Not sure what kind of game you are making, but it is usually best to stay within Unreals framework. So I would advice to set up a proper GameMode and let it handle the spawning of PlayerPawn and Controller.
I know I am a bit late to this thread, but I ran into the same issue and for me the solution was different. I spawn my pawns in C++ on the server side. If you do not set the function that spawns the pawns with ‘WithValidate’ it runs also on the client, creating 2 copies of the pawn.