When called OpenLevel from Android to connect a dedicated server

When I connect to a dedicated server with UGameplayStatics::OpenLevel(), I appended “Name=UserName” to “Options”. Then UserName becomes a PlayerName when connected a server on PC. But it works differently on Android, even though I used same codes. It shows “localhost-numbers” instead of UserName.

It seems that UE4 overrides a nickname according to platforms. Is there any reason to do that?

Thanks

I believe you are talking about ULocalPlayer::GetNickname() calling UOnlineEngineInterface::Get()->GetPlayerNickname()? On Android this will use FOnlineIdentityGooglePlay::GetPlayerNickname() which returns the PlayerAlias set in OnlineIdentityGooglePlay::SetPlayerDataFromFetchSelfResponse() callback.

This depends on Google Play logging in.