I want to make a mobile game(firebase implemented) where the user logins, and the game save score and some other things + adding leaderboards,acheivements.
1. I used the google play service to test the leaderboards and achievement,but do firebase do this all?or i have to implement the google play services with it?
2. concerning the login user and saved scores/some other stuff whats the best way to achieve this since the game is also on iOS?
like the user should add/create an email and that is saved to the cloud with authentication this work on both iOS and android since i didn’t use the google mail account .is this better?or the logins with his Facebook account?
With Firebase Authentication and -Database (Realtime the only one currently supported for Unity), you can use both Email/Pasword- Facebook (an other SOME’s) as well as Anonymously and your own custom authentication method, and then you can use the Database to store your highscore by UserID.
I normally create shared paths in the database in the root, like: /DATABASE_URL/highscore/$uid/.
And if I want to store user private data i use the path /DATABASE_URL/users/$uid/score/.
`public void SyncToServer(string tableName, object items, bool sharedData=false) {
if (FirebaseAuth.DefaultInstance.CurrentUser == null) {
Debug.LogError(“SyncWithFirebase: User is not authorized/logged in. Data will not be syncronized with server!”);
return;
}
tableName in this case would be “highscore” and items object in this case could be a List of a HighScore class you want to save (ie. int LevelName, int Score).