스토리지

NOX 구글로그인 확인하기 본문

Unity/유니티 기본

NOX 구글로그인 확인하기

ljw4104 2021. 6. 18. 12:16

https://github.com/playgameservices/play-games-plugin-for-unity

 

playgameservices/play-games-plugin-for-unity

Google Play Games plugin for Unity. Contribute to playgameservices/play-games-plugin-for-unity development by creating an account on GitHub.

github.com

Unity만 로그보기 : adb logcat -s Unity

 

using GooglePlayGames;
using GooglePlayGames.BasicApi;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SocialPlatforms;

public class App : MonoBehaviour
{
    public Text txtVersion;

    void Start()
    {
        this.txtVersion.text = Application.version;

        Debug.Log("==========================> Init GPGS");

        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().EnableSavedGames().Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.DebugLogEnabled = true;
        PlayGamesPlatform.Activate();

        Debug.Log("==========================> Autheticate");
        PlayGamesPlatform.Instance.Authenticate(SignInInteractivity.CanPromptAlways, (result) => {
            // handle results
            Debug.Log("==========================> " + result);
        });
    }
}
Comments