OnPhotonPlayerConnected name problem

Hi all,

I am trying to write every players’ name when they connected to the console. So,

void OnPhotonPlayerConnected(PhotonPlayer connected){
Debug.Log(connected.name);
}

doesnt work. It writes empty string to the console. When i try it OnPhotonPlayerDisconnect it works perfectly but this doesnt work.

Any help will be appreciated. Thanks.

I tested your code in my latest version (to become PUN 1.26 soon) and it works.

Please try setting the PhotonNetwork.player.name before you connect (at least before you join).
If it gets set after joining, then it will be missing in OnPhotonPlayerConnected.

If it’s not working at all, then it might be something I fixed recently and PUN 1.26 will solve this. Coming soon :slight_smile: