internal PlayGamesLocalUser(IPlayGamesPlatform plaf) : base("localUser", string.Empty, string.Empty) { mPlatform = plaf; emailAddress = null; mStats = null; }
override protected void OnEnable() { // gav4.LogEvent (CATEGORY, "OnEnable", null, 0); base.OnEnable(); if (gamesPlatform != null) { return; } Debug.Log("***Initialize Play Games …"); if (Application.isEditor) { gamesPlatform = new DummyPlayGamesPlatform(); } else { float startTime = Time.unscaledTime; // https://github.com/playgameservices/play-games-plugin-for-unity 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>) .Build(); Debug.Log("***PlayGamesPlatform.InitializeInstance() …"); PlayGamesPlatform.InitializeInstance(config); // recommended for debugging: // PlayGamesPlatform.DebugLogEnabled = true; Debug.Log("***PlayGamesPlatform.Activate() …"); PlayGamesPlatform.Activate(); gav4.LogTiming(CATEGORY, Utils.DeltaTimeMillis(startTime), "PlayGamesPlatform-Activate", null); gamesPlatform = PlayGamesPlatform.Instance; } }