Player Pawn, Character and Camera

I am not yet properly familiar with the UE4 hierarchy. When I create a new Player Pawn or Player Character and set it to be used in the current GameMode, the game spawns one of those objects with camera somehow attached to it. Why is that? Shouldn’t the game spawn only what the class defines (meaning the object without camera)?

when you attach a camera to a pawn, that camera becomes a part of that pawn. so it will be spawned with its camera

Yes - that makes perfect sense, but what if the character/the pawn doesn’t have a camera component? The camera is still created somehow.

The ‘it will sorta make one’ is what I wanted to know. So if there is no camera to begin with, the game will create and attach one to the PlayerPawn/PlayerCharacter?

yes. when there is no camera attached. the editor will create one at the origin of character mesh and attach it automatically.

if you delete the camera of a third person character it becomes a first person but with a wrong camera location

Is it actually attaching a camera component to the pawn? Also the game needs at least 1 camera set to be active for player 0 or it will sorta make one.

Ok - got it. If you post this as an answer, it will get accepted.

it only occurs for playable pawns not AIs