Notifications
Clear all
Combu Server/Client
2
Posts
2
Users
0
Reactions
749
Views
Topic starter
Hello, I would like to know (there are not lot of documentation or examples) about how to CreateGuest and after, if the user creates its account, rewrite guest information to registered account and upload to server.
Thanks in advanced!
Posted : 10/08/2017 7:53 pm
You can activate rememberCredentials to store the guest account login, when your user wants to customize his account then you can use the method Update of CombuManager.localUser to change the username, password etc.
Example:
// First try to auto-login CombuManager.instance.rememberCredentials = true; string storedUsername, storedPassword; if (User.CanAutoLogin(out storedUsername, out storedPassword)) { Debug.Log ("Try to auto-login with username '" + storedUsername + "' and password '" + storedPassword + "'"); User.AutoLogin ((bool loginSuccess, string loginError) => { Debug.Log ("AutoLogin: " + loginSuccess + " -- " + loginError); if (loginSuccess) Debug.Log("Logged in"); }); return; } // If autologin fails then create a guest account var user = new User (); user.CreateGuest ((bool success, string error) => { if (success) { Debug.Log ("CreateGuest - Success=" + success + " > Error=" + error); } });
FRANCESCO CROCETTI @ SKARED CREATIONS
Posted : 11/08/2017 10:51 am