Guest User

Untitled

a guest
Feb 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using GooglePlayGames;
  5. using GooglePlayGames.BasicApi;
  6. using UnityEngine.SocialPlatforms;
  7.  
  8. public class PlayGameServices : MonoBehaviour {
  9. public void Start () {
  10.  
  11. //Google Play Services
  12. PlayGamesPlatform.Activate();
  13.  
  14. PlayGamesPlatform.DebugLogEnabled = true;
  15.  
  16. pSLogin ();
  17.  
  18. }
  19.  
  20. public void Update () {
  21.  
  22. }
  23.  
  24. //Google Play Services for login
  25. public void pSLogin()
  26. {
  27. Social.localUser.Authenticate((bool success) =>
  28. {
  29. if(success)
  30. {
  31. Debug.Log("You've successfully logged in");
  32. }
  33. else
  34. {
  35. Debug.Log("Log in Unsuccessful");
  36. }
  37. });
  38. }
  39. }
Add Comment
Please, Sign In to add comment