Set Player Name When Joining a Server (UE 4.2)

I’ve been mucking about with Shooter Game recently trying to get players to be able to join a server and have their names set for them. In the Engine.ini’s I’ve found the name parameter under the URL section but it doesn’t seem to do anything. Using SetPlayerName in the console works for a given round but is reset on map change or round end.

If I print out the options string (if I understand correctly this is where the player’s name would go when they join a server) it just contains the computer’s name which ends up setting the name to the default (computer name followed by what I think is the unique ID of the player).

Any help with this would be greatly appreciated.

Cheers and thanks.


What I ended up doing was adding a variable, PlayerName, to UShooterLocalPlayer and overriding GetNickName. The variable is populated by Engine.ini.


UCLASS(Config=Engine, transient)
class UShooterLocalPlayer : public ULocalPlayer

		FString PlayerName;


 	* Returns the name defined in  Engine.ini
	virtual FString GetNickname() const OVERRIDE;


FString UShooterLocalPlayer::GetNickname() const {
		return this->PlayerName;



This seems to work fairly well.

Old thread but still useful, thanks!