- Home /
Social.localUser username = Lerpz?
Hi,
I'm trying to implement a basic leaderboard through the Google Gameservices, but when I try this:
void Start()
{
Social.localUser.Authenticate(ProcessAuthentication);
}
void ProcessAuthentication(bool success)
{
Debug.Log("Authenticated, user = " + Social.localUser.userName);
}
The username that gets logged is 'Lerpz'. This happens in both editor and on an Android device (using logcat to see the log)
I really don't understand where this is coming from, my project is in no way connected to the Lerpz-project, so my guess is I'm missing something to setup basic Social features.
I can't submit a highscore or get any leaderboard, so I'm really stuck here.
Any help on this is very much appreciated.
Answer by Soleferry · Jul 23, 2014 at 12:44 PM
Ok i just found out what was the problem.
Lerpz is our localUser cause we don't success to activate the google play platform. To remind everybody, the code to use is :
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
...
// recommended for debugging:
PlayGamesPlatform.DebugLogEnabled = true;
// Activate the Google Play Games platform
PlayGamesPlatform.Activate();
This allow you to activate the google play platform and replace the local platform used by unity, which contain this mysterious Lerpz. Do this activation only one time in your code, in a start or something and it'll be okay !
For those who want the complete instructions about the plugin Google Play-Unity, here is it : https://github.com/playgameservices/play-games-plugin-for-unity
Hope it will help !
it is necessary that the apk should be in playstore, for testing?, because when i'm trying to implement same code in my game app, Pop up of game play is co$$anonymous$$g but in my log it showing authentication failed.
Answer by orhankurulan · Nov 15, 2015 at 08:09 AM
So how do we get username and email and pass it to a private string? Any idea?
Your answer
Follow this Question
Related Questions
Prevous score value for leaderboard in GameCenter 0 Answers
google leaderboard crashing my game? 3 Answers
User modified/customized Android native Twitter posts 1 Answer
Simple Leaderboard for Android without using Google services? 1 Answer
Google Play Games plugin for Unity Not Authenticating 9 Answers