ugameplaystatics::getplayercharacter(GetWorld(), 0)->GetName() crashes editor

PlayerCharacter is different from PlayerPawn and different from PlayerController. Character is a thing that has 2 legs (just google differences, i am bad at explaining that xd). Your level probably has no character but a pawn is standard. I think default you will control a camera which acts as pawn. But the camera is not a character