So. I have made a game with unity 5. And i have downloaded and configured the google play services plugin. I can sign in and unlock achievements with success. But for some reason the
Social.ShowAchievementsUI();
Social.ShowLeaderboardUI();
void Start () {
if (PlayGamesPlatform.Instance.IsAuthenticated() == false)
{
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();
PlayGamesPlatform.InitializeInstance(config);
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
SignIn();
}
void SignIn()
{
Social.localUser.Authenticate((bool success) =>
{});
}
achievementsUI
public void ShowAchievementsUI()
{
Social.ShowAchievementsUI();
}
Leaderboard ui
public void ShowLeaderboardsUI()
{
Social.ShowLeaderboardUI();
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
using GooglePlayGames.BasicApi;
Adding:
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
To AndroidManifest.xml fixed the issue