Change Usernames while Connected?

My chat is coded to change usernames based on what channel you're connected to. The Global chat being the player's main username that they use to log into the game, and then the regular room chats have their character's name. Of course I have to disconnect and reconnect to chat every time the player changes channels and you can see why that's not what I want to be doing.

What I have WORKS, but I would rather that the player stayed connected to chat when they switched usernames since connection requires a username
chatClient.Connect(ChatAppId, chatVer, new ExitGames.Client.Photon.Chat.AuthenticationValues(this.UserName));

Is there a way to possibly change this or have chatClient.PublishMessage utilize a changing string ???


  • hi, there.

    You may do next trick

    Instead of sending just plain strings, you may send for instance json string like this {nick="userNickForThisChannel" msg ="Message to channel"}

    you may use also object with custom serialization. but main idea is you may send all info inside message
  • I will give that a try! Thank you so much.