Login Session
Options
Hello there, i made an mmo login screen using wwwform and a mysql database
How can I make a login session, to keep the user online and disconnect him?
I made the login and character creation screen(there is no link between login/character) in same scene, using 2 Canvas, but i probably want to make a new scene for game.
I use PUN for game.
How can I make a login session, to keep the user online and disconnect him?
I made the login and character creation screen(there is no link between login/character) in same scene, using 2 Canvas, but i probably want to make a new scene for game.
I use PUN for game.
0
Comments
-
Hi,
The login is independant from connecting to pun, so you'll be in charge of keeping them two feature in synch.
Login in a user is to get a Unique and persistant ID in between sessions to keep track of user data as well as using friends features for example.
so, when you have your player logged in within your system, you can then inject it's Id like soPhotonNetwork.AuthValues = new AuthenticationValues() {UserId = YOURLOGINPLAYERID}; PhotonNetwork.playerName = YOURLOGINPLAYERNAME; PhotonNetwork.ConnectUsingSettings("1.0");
Does that make sense? So if you want to keep a use logged in between sessions ( player quiting the app and open it again, you'll need to save the login details in playerPrefs.
Bye,
Jean1 -
Thanks, this is what i needed!0