Android : ShowAchievementsUI(); don't want to appear on Android

on Friday, October 10, 2014


I am using the official PlayGameServices plugin for Unity, and have been following the installation to the point. Authentication seems to work like a charm, but when I want to do the ShowAchievementsUI();, nothing happends. No UI, no errors, no crashes.


Ive been googling around for a while, it seems other people have hit this problem, but with no solution in sight.


My code at the moment is :



using GooglePlayGames;
using UnityEngine.SocialPlatforms;

void Start() {
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
LoginSocialGamecenter();
}


public static void LoginSocialGamecenter() {
if (Social.localUser.authenticated) {
Social.ShowAchievementsUI (); Debug.Log("Pancakes!");
return;
}
}


And "Pancakes!" comes out perfectly. Authentication UI on first install also shows up nicely. It fails on all devices I have, but shows up perfectly on Android.


According to the documentation, it should work as described:


Showing the Achievements UI



To show the built-in UI for all leaderboards, call Social.ShowAchievementsUI.



using GooglePlayGames;
using UnityEngine.SocialPlatforms;
...
// show achievements UI
Social.ShowAchievementsUI();

This will show a standard UI appropriate for the look and feel of the platform (Android or iOS).


0 comments:

Post a Comment