Photon Unity Networking Classic Console Errors
Options
Hey, I am seeming to have a problem connecting to a game server and I keep getting an error "Cannot Authenticate as this user. Parameters:{} Server: NameServer. I have tried many different changing fixed that lead to not helping and was hoping someone here has an idea what it could be. The first Image is the CallAuthenticate setup. The Last photo is the error I am getting every time I run the Script that it placed on a GameObject If anyone has an Idea that would be great.
https://imgur.com/58JA993
https://imgur.com/heirTk8
https://imgur.com/58JA993
https://imgur.com/heirTk8
0
Comments
-
Hi @Jackson,
Thank you for choosing Photon!
Why are you modifying PUN code?
You don't need this.
Revert all changes or import back PUN clean.
To authenticate follow this code:AuthenticationValues authValues = new AuthenticationValues(); // do not set authValues.Token or authentication will fail authValues.AuthType = CustomAuthenticationType.Custom; authValues.AddAuthParameter("username", userId); authValues.AddAuthParameter("token", authcookie); authValues.UserId = userId; // this is required when you set UserId directly from client and not from web service PhotonNetwork.AuthValues = authValues; // connect
0