Auto Login using ChatUIAutoLogin

I purchased the PhotonChat as suggested in another thread I had in the PUN Sub forum. I am able to use the login setup where i can add a username and it doesn't matter on the password but what i wanted to do is use the auto login feature so the user doesn't have to login with a username/password but instead just be prompted with the username to use. I followed the document pdf which was indicating just drag and drop the prefab but it never connects and I'm not figuring out why.

Any ideas? Nothing is coming up on the logs either.


  • I guess another way to do it is ti not use the password field under Login Window > Input so it just asks for a username but that doesn't allow auto login unless i'm missing something. Dragging the auto login prefab into the scene and filling out the chat info does not work. The only way I can get logged in to the chat is using the login window.
  • well that won't work either because if I move from 1 scene to another i need it to keep the username that the user logged in with initially so their name transfers from 1 scene to another.
  • I am new to your topic, so I might be missing info you gave in another thread.

    The ChatUiAutoLogin component attempts to use your PhotonNetwork.playerName as ID for Photon Chat. It does so when you join a room in PUN but not "on start", which might be misleading.

    It should be possible to skip the "login" part of the Chat UI this way, as ChatUiAutoLogin does connect you. Of course, this only "helps" when you joined a room already.

    Does that fit your need? Are you even also using PUN for a game?
    If this doesn't help, please let us know more about your use case.
  • I have a project that is already pretty far along. I have PUN imported and am learning how to turn my project into a multiplayer project. Once someone clicks on "Multiplayer" it takes them to another scene where it has them enter in their username into the photon chat UI that i purchased, this will then put you in say the main multiplayer lobby. From here i'm trying to learn how to have multiple rooms that a player can join to either spectate or play against someone else. Once that player goes into that room though i am trying to get their username from the last scene to auto join the chat in that room.

    So if I am understanding correctly, the photon chat UI login does not use the photonnetwork.playername but instead something else. I know before I used the photon chat ui i used the PUN chat but it used OnGUI and i wasn't able to convert it to the new canvas system so I just purchased the photon chat ui.

    So is there a way to have the player that logged in on the multiplayer scene carry over to whatever other room they join and have it auto login?

    I would be more than happy to open up my TeamViewer to show you.

  • In chat, you login once with a username (or better: a unique name, which makes it a userID).
    This is what ChatUiAutoLogin does. When PUN is online, this component connects with the chat server, using PhotonNetwork.playerName as ID for Photon Chat.

    When you want to join a chat channel, which is related to a room, then you need to create your own component to do so, I believe. You can use PUN's callbacks (on joined room) to "subscribe" to a chat channel, e.g.. One easy way is to use a chat channel with the name of the room.

    In the Marco Polo Tutorial, we describe how PUN does callbacks:

    In the chat "Intro", we briefly explain the chat API to subscribe to a channel:

    Hope that helps.
    Sorry, we can't do TeamViewer sessions to check your code in-detail. Before the Unite Europe, we're fully booked.