Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using GooglePlayGames;
- using GooglePlayGames.BasicApi;
- using UnityEngine.SocialPlatforms;
- public class PlayGameServices : MonoBehaviour {
- public void Start () {
- //Google Play Services
- PlayGamesPlatform.Activate();
- PlayGamesPlatform.DebugLogEnabled = true;
- pSLogin ();
- }
- public void Update () {
- }
- //Google Play Services for login
- public void pSLogin()
- {
- Social.localUser.Authenticate((bool success) =>
- {
- if(success)
- {
- Debug.Log("You've successfully logged in");
- }
- else
- {
- Debug.Log("Log in Unsuccessful");
- }
- });
- }
- }
Add Comment
Please, Sign In to add comment