Ejemplo n.º 1
0
 void Awake()            //
 {
     PlayGamesPlatform.InitializeInstance(config);
     // recommended for debugging:
     PlayGamesPlatform.DebugLogEnabled = true;
     // Activate the Google Play Games platform
     PlayGamesPlatform.Activate();
     LogIn();
 }
Ejemplo n.º 2
0
 private void InitializedGooglePlay()
 {
     PlayGamesPlatform.InitializeInstance(new PlayGamesClientConfiguration.Builder()
                                          .RequestIdToken()
                                          .RequestEmail()
                                          .Build());
     PlayGamesPlatform.DebugLogEnabled = true;
     PlayGamesPlatform.Activate();
 }
Ejemplo n.º 3
0
    void SetUpGooglePlatform()
    {
        PlayGamesClientConfiguration config = new
                                              PlayGamesClientConfiguration.Builder()
                                              .Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();
    }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();

        SignIn();
    }
Ejemplo n.º 5
0
        void Start()
        {
            message.text = "Bienvenidos a M2";
            PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();

            PlayGamesPlatform.InitializeInstance(config);
            GooglePlayGames.PlayGamesPlatform.DebugLogEnabled = true;
            PlayGamesPlatform.Activate();
        }
Ejemplo n.º 6
0
    // Use this for initialization
    void Awake()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                                              .EnableSavedGames().Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.DebugLogEnabled = false;
        PlayGamesPlatform.Activate();
    }
Ejemplo n.º 7
0
        public GooglePlayAuth()
        {
            var configuration = new PlayGamesClientConfiguration.Builder()
                                .AddOauthScope("profile")
                                .RequestServerAuthCode(false)
                                .Build();

            PlayGamesPlatform.InitializeInstance(configuration);
        }
Ejemplo n.º 8
0
    //Enable cloud save
    public void enableCloudSave()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                                              // enables saving game progress.
                                              .EnableSavedGames()
                                              .Build();

        PlayGamesPlatform.InitializeInstance(config);
    }
Ejemplo n.º 9
0
public class PlayGamesScript : MonoBehaviour { //this script stores the functions for login and google play
    //services achievement unlocks and leaderboards to make it
    //easier to call within other scripts

    void Start()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();          //this initializes Google Play Services to run within the app

        SignIn();
    }
Ejemplo n.º 10
0
    // Use this for initialization
    void Start()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.DebugLogEnabled = true;
        PlayGamesPlatform.Activate();
        SingIn();
    }
Ejemplo n.º 11
0
    //public GameObject disconnectedMenu;


    // Use this for initialization

    public void Awake()
    {
        instance = this;
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                                              .EnableSavedGames().Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();
    }
Ejemplo n.º 12
0
    // Use this for initialization
    void Start()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();

        Social.localUser.Authenticate(succes => { });
    }
 private void Awake()
 {
     //초기화 함수. 인스턴스를 만드는 역할.
     PlayGamesPlatform.InitializeInstance(new PlayGamesClientConfiguration.Builder().Build());
     //디버그용 변수
     PlayGamesPlatform.DebugLogEnabled = true;
     //구글 관련 서비스 활성화.
     PlayGamesPlatform.Activate();
 }
Ejemplo n.º 14
0
    private void InitializeGooglePlayGamesService()
    {
        var config = new PlayGamesClientConfiguration.Builder()
                     .Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.DebugLogEnabled = true;
        PlayGamesPlatform.Activate();
    }
 protected void Awake()
 {
     this.m_authSign = null;
     this.m_identity = null;
     this.m_verificationSignature = null;
     this.ChangeState(PlatformConnectState.Initializing);
     PlayGamesPlatform.InitializeInstance(new PlayGamesClientConfiguration.Builder().Build());
     PlayGamesPlatform.Activate();
 }
Ejemplo n.º 16
0
    // Use this for initialization
    void Start()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();

        PlayGamesPlatform.DebugLogEnabled = true;
        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();
        GooglePlayGames.OurUtils.Logger.DebugLogEnabled = true;
    }
Ejemplo n.º 17
0
        /// <summary>
        /// Initializes the service. This is required before any other actions can be done e.g reporting scores.
        /// During the initialization process, a login popup will show up if the user hasn't logged in, otherwise
        /// the process will carry on silently.
        /// Note that on iOS, the login popup will show up automatically when the app gets focus for the first 3 times
        /// while subsequent authentication calls will be ignored.
        /// </summary>
        public static void Init()
        {
            // Authenticate and register a ProcessAuthentication callback
            // This call needs to be made before we can proceed to other calls in the Social API
#if UNITY_IOS
            GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true);
            Social.localUser.Authenticate(ProcessAuthentication);

#if EASY_MOBILE_PRO && !UNITY_EDITOR
            // Register the default GKLocalPlayerListener for invitation delegate if Multiplayer is enabled.
            // EM Pro only.
            if (EM_Settings.GameServices.IsMultiplayerEnabled)
            {
                RegisterDefaultGKLocalPlayerListener();
            }
#endif
#elif UNITY_ANDROID && EM_GPGS
#if EASY_MOBILE_PRO
            PlayGamesClientConfiguration.Builder gpgsConfigBuilder = new PlayGamesClientConfiguration.Builder();

            // Enable Saved Games.
            if (EM_Settings.GameServices.IsSavedGamesEnabled)
            {
                gpgsConfigBuilder.EnableSavedGames();
            }

            // Register an internal invitation delegate and match delegate if Multiplayer is enabled.
            if (EM_Settings.GameServices.IsMultiplayerEnabled)
            {
                gpgsConfigBuilder.WithInvitationDelegate(OnGPGSInvitationReceived);
                gpgsConfigBuilder.WithMatchDelegate(OnGPGSTBMatchReceived);
            }

            // Build the config
            PlayGamesClientConfiguration gpgsConfig = gpgsConfigBuilder.Build();

            // Initialize PlayGamesPlatform
            PlayGamesPlatform.InitializeInstance(gpgsConfig);
#endif

            // Enable logging if required
            PlayGamesPlatform.DebugLogEnabled = EM_Settings.GameServices.GgpsDebugLogEnabled;

            // Set PlayGamesPlatforms as active
            if (Social.Active != PlayGamesPlatform.Instance)
            {
                PlayGamesPlatform.Activate();
            }

            // Now authenticate
            Social.localUser.Authenticate(ProcessAuthentication);
#elif UNITY_ANDROID && !EM_GPGS
            Debug.LogError("SDK missing. Please import Google Play Games plugin for Unity.");
#else
            Debug.Log("Failed to initialize Game Services module: platform not supported.");
#endif
        }
Ejemplo n.º 18
0
    /**
     * 初期化
     */
    private void Init()
    {
        var config = new PlayGamesClientConfiguration.Builder()
                     .EnableSavedGames()
                     .Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();
    }
Ejemplo n.º 19
0
    public void Init()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();

        PlayGamesPlatform.InitializeInstance(config);

        PlayGamesPlatform.Activate();
        LogIn();
    }
Ejemplo n.º 20
0
    public void SignInSrvc(Action <Garter._GoogleSignInAuth> cb)
    {
        if (!Social.localUser.authenticated)
        {
            Garter.I.SdkWindowOpened("login"); // mute game

            PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                                                  // enables saving game progress.
                                                  //.EnableSavedGames()
                                                  // registers a callback to handle game invitations received while the game is not running.
                                                  //.WithInvitationDelegate(< callback method >)
                                                  // registers a callback for turn based match notifications received while the game is not running.
                                                  //.WithMatchDelegate(< callback method >)
                                                  // requests the email address of the player be available. Will bring up a prompt for consent.
                                                  .RequestEmail()

                                                  //.AddOauthScope("email")
                                                  // requests a server auth code be generated so it can be passed to an associated backend server application and exchanged for an OAuth token.
                                                  .RequestServerAuthCode(true)
                                                  // requests an ID token be generated. This OAuth token can be used to identify the player to other services such as Firebase.
                                                  .RequestIdToken()
                                                  .Build();

            PlayGamesPlatform.InitializeInstance(config);

            PlayGamesPlatform.DebugLogEnabled = true;

            PlayGamesPlatform.Activate();

            Social.localUser.Authenticate((bool success) =>
            {
                Garter._AccessTokens accessTokens = null;

                if (success)
                {
                    accessTokens = new Garter._AccessTokens
                    {
                        //ac = PlayGamesPlatform.Instance.GetServerAuthCode(),
                        at = ((PlayGamesLocalUser)Social.localUser).GetIdToken(),
                        e  = ((PlayGamesLocalUser)Social.localUser).Email,
                        n  = Social.localUser.userName
                    };
                }

                cb(new Garter._GoogleSignInAuth()
                {
                    success = success,
                    aTokens = accessTokens
                });
            });
        }
        else
        {
            cb(null);
        }
    }
Ejemplo n.º 21
0
        //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        // Private Methods
        //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

        //----------------------------------------
        private void InitializeGooglePlay()
        {
            PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                                                  .EnableSavedGames() // enables saving game progress
                                                  .Build();

            PlayGamesPlatform.InitializeInstance(config);
            PlayGamesPlatform.DebugLogEnabled = playGamesDebugEnabled;  // recommended for debugging
            PlayGamesPlatform.Activate();                               // activate the Google Play Games platform
        }
Ejemplo n.º 22
0
        public void Init()
        {
            PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                                                  .WithInvitationDelegate(OnInvitationReceived)
                                                  .Build();

            PlayGamesPlatform.InitializeInstance(config);
            PlayGamesPlatform.DebugLogEnabled = true;
            PlayGamesPlatform.Activate();
        }
    void Start()
    {
        PlayGamesPlatform.DebugLogEnabled = true;
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();

        PlayGamesPlatform.InitializeInstance(config);

        LoadAchievementKeys();
        LoadLeaderboardKeys();
    }
Ejemplo n.º 24
0
    void Start()
    {
        gamecontrol = FindObjectOfType <GameControl>();

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

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();
        Login();
    }
Ejemplo n.º 25
0
    /// GPGS를 초기화 합니다.
    public void InitializeGPGS()
    {
        bLogin = false;

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

        PlayGamesPlatform.InitializeInstance(_config);
        PlayGamesPlatform.Activate();
        PlayGamesPlatform.DebugLogEnabled = false;
    }
Ejemplo n.º 26
0
    void Start()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();

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

        PlayGamesPlatform.Instance.Authenticate(loginCallback, true);
    }
Ejemplo n.º 27
0
    /**
     * Activates PlayGamesPlatform
     */
    internal static void Activate()
    {
        var config = new PlayGamesClientConfiguration.Builder().Build();

        PlayGamesPlatform.InitializeInstance(config);
        // recommended for debugging:
        //PlayGamesPlatform.DebugLogEnabled = true;
        // Activate the Google Play Games platform
        PlayGamesPlatform.Activate();
    }
Ejemplo n.º 28
0
    public void LoginToGPG()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                                              .Build();

        PlayGamesPlatform.DebugLogEnabled = true;
        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();
        Login();
    }
Ejemplo n.º 29
0
    void GooglePlayServiceInitialize()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                                              .RequestIdToken()
                                              .Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.DebugLogEnabled = true;
        PlayGamesPlatform.Activate();
    }
Ejemplo n.º 30
0
    void Awake()
    {
        //Creating a new config builder
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().EnableSavedGames().Build();

        //Initializing new config file
        PlayGamesPlatform.InitializeInstance(config);
        //Activating GPS
        PlayGamesPlatform.Activate();
    }