- Home /
Question by
importguru88 · Sep 28, 2016 at 08:11 PM ·
uibuttongoogle playhowservice
How do I call a ui buttons for google play services
I am having a problem signing in google play. I have everything set up in google play, I just need to sign in google play services. I build the app and it won't allow me to sign in. I am using ui buttons and I calling the function logging. I also need othe ui buttons for leaderboard , achievement, . I also need the player to sign out . I also download the current build plugin from the git hub website . I could get none of the scripts to work . Here is my script I had made up for google play :
using UnityEngine;
using System.Collections;
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
public class kkoko : MonoBehaviour {
void Start ()
{
}
public void Logging ()
{
PlayGamesPlatform.Activate();
PlayGamesPlatform.DebugLogEnabled = true;
}
public void Login()
{
Social.localUser.Authenticate((bool success) =>
{
if (success)
{
Debug.Log("You've successfully logged in");
}
else
{
Debug.Log("Login failed for some reason");
}
});
}
public void SignOut()
{
((PlayGamesPlatform)Social.Active).SignOut();
}
}
Comment
Your answer
Follow this Question
Related Questions
Button on Panel is not responding 1 Answer
RPG Maker style menu with UI buttons that are selected by controller 0 Answers
UI Button Event Trigger Update Selected not working 0 Answers
UI Button Set Image 1 Answer
UI Button ON/Off 3 Answers