Google Play Games не работает в приложении сделанном на Unity
2021.05.10 19:10:01.868 32031 32031 Debug
ViewRootImpl@1c95df6[UnityPlayerActivity] ViewPostIme pointer 0
2021.05.10 19:10:02.111 32031 32031 Debug ViewRootImpl@1c95df6[UnityPlayerActivity] ViewPostIme pointer 1
2021.05.10 19:10:02.152 32031 32047 Info Unity Starting Auth with token client.
2021.05.10 19:10:02.152 32031 32047 Info Unity
2021.05.10 19:10:02.153 32031 32047 Info Unity [Play Games Plugin 0.10.12] 05.10.21 19:10:02 +03:00 DEBUG: Activating PlayGamesPlatform.
2021.05.10 19:10:02.153 32031 32047 Info Unity
2021.05.10 19:10:02.153 32031 32047 Info Unity [Play Games Plugin 0.10.12] 05.10.21 19:10:02 +03:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform
2021.05.10 19:10:02.153 32031 32047 Info Unity
2021.05.10 19:10:02.153 32031 32047 Info Unity [Play Games Plugin 0.10.12] 05.10.21 19:10:02 +03:00 DEBUG: Creating platform-specific Play Games client.
2021.05.10 19:10:02.153 32031 32047 Info Unity
2021.05.10 19:10:02.154 32031 32047 Info Unity [Play Games Plugin 0.10.12] 05.10.21 19:10:02 +03:00 DEBUG: Creating Android IPlayGamesClient Client
2021.05.10 19:10:02.154 32031 32047 Info Unity
2021.05.10 19:10:02.160 32031 32047 Debug HelperFragment Creating fragment
2021.05.10 19:10:02.162 32031 32031 Debug HelperFragment onResume called
2021.05.10 19:10:02.163 32031 32031 Debug SignInRequest signIn
2021.05.10 19:10:02.163 32031 32031 Debug SignInRequest Building client for: 2e779e5 (a:false e:false i:false wc: 605613785063-ogmlqqtptsq3tkrv1cja601oql1jl65g.apps.googleusercontent.com f: false)
2021.05.10 19:10:02.189 32031 32031 Debug SignInRequest canReuseAccount: true
2021.05.10 19:10:02.193 32031 32031 Debug SignInRequest lastSignedInAccount is null
2021.05.10 19:10:02.194 32031 32031 Debug SignInRequest signInClient.silentSignIn
2021.05.10 19:10:02.790 32031 32031 Debug SignInRequest silentSignIn.onFailure
2021.05.10 19:10:02.921 32031 32221 Debug AudioTrack stop() called with 777216 frames delivered
2021.05.10 19:10:02.966 32031 32340 Debug OpenGLRenderer HWUI GL Pipeline
2021.05.10 19:10:02.969 32031 32031 Debug ViewRootImpl@f750999[SignInHubActivity] setView = DecorView@317e45e[SignInHubActivity] TM=true MM=false
2021.05.10 19:10:02.970 32031 32031 Debug ViewRootImpl@1c95df6[UnityPlayerActivity] MSG_WINDOW_FOCUS_CHANGED 0
2021.05.10 19:10:02.988 32031 32031 Debug ViewRootImpl@f750999[SignInHubActivity] dispatchAttachedToWindow
2021.05.10 19:10:03.005 32031 32031 Verbose Surface sf_framedrop debug : 0x4f4c, game : false, logging : 0
2021.05.10 19:10:03.006 32031 32031 Debug ViewRootImpl@f750999[SignInHubActivity] Relayout returned: old=[0,0][0,0] new=[0,0][1920,1080] result=0x7 surface={valid=true 531107602432} changed=true
2021.05.10 19:10:03.006 32031 32340 Info OpenGLRenderer Initialized EGL, version 1.4
2021.05.10 19:10:03.006 32031 32340 Debug OpenGLRenderer Swap behavior 2
2021.05.10 19:10:03.009 32031 32340 Debug libGLESv1 STS_GLApi : DTS, ODTC are not allowed for Package : com.IzGames.CrossWay
2021.05.10 19:10:03.016 32031 32340 Debug mali_winsys EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1920x1080]-format:1
2021.05.10 19:10:03.016 32031 32340 Debug OpenGLRenderer eglCreateWindowSurface = 0x7b68d2a230
2021.05.10 19:10:03.017 32031 32031 Debug ViewRootImpl@1c95df6[UnityPlayerActivity] MSG_RESIZED: frame=Rect(0, 0 - 1920, 1080) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 72 - 0, 0) or=2
2021.05.10 19:10:03.017 32031 32031 Debug ViewRootImpl@f750999[SignInHubActivity] MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1920, 1080) ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=2
2021.05.10 19:10:03.070 32031 32031 Debug ViewRootImpl@1c95df6[UnityPlayerActivity] Relayout returned: old=[0,0][1920,1080] new=[0,0][1920,1080] result=0x1 surface={valid=true 534902071296} changed=false
2021.05.10 19:10:03.289 32031 32031 Debug ViewRootImpl@f750999[SignInHubActivity] MSG_WINDOW_FOCUS_CHANGED 1
2021.05.10 19:10:03.289 32031 32031 Verbose InputMethodManager Starting input: tba=android.view.inputmethod.EditorInfo@7854d0c nm : com.IzGames.CrossWay ic=null
2021.05.10 19:10:03.289 32031 32031 Info InputMethodManager startInputInner - mService.startInputOrWindowGainedFocus
2021.05.10 19:10:03.346 32031 32031 Debug ViewRootImpl@f750999[SignInHubActivity] MSG_WINDOW_FOCUS_CHANGED 0
2021.05.10 19:10:03.347 32031 32031 Error SignInRequest Setting result error status code to: 16
2021.05.10 19:10:03.364 32031 32031 Info Unity Returning an error code.
2021.05.10 19:10:03.364 32031 32031 Info Unity
2021.05.10 19:10:03.368 32031 32031 Debug HelperFragment onResume called
2021.05.10 19:10:03.372 32031 32031 Debug ViewRootImpl@1c95df6[UnityPlayerActivity] MSG_RESIZED: frame=Rect(0, 0 - 1920, 1080) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2
2021.05.10 19:10:03.372 32031 32031 Debug ViewRootImpl@1c95df6[UnityPlayerActivity] MSG_WINDOW_FOCUS_CHANGED 1
2021.05.10 19:10:03.373 32031 32031 Verbose InputMethodManager Starting input: tba=android.view.inputmethod.EditorInfo@379e86a nm : com.IzGames.CrossWay ic=null
2021.05.10 19:10:03.373 32031 32031 Info InputMethodManager startInputInner - mService.startInputOrWindowGainedFocus
2021.05.10 19:10:03.382 32031 32340 Debug OpenGLRenderer eglDestroySurface = 0x7b68d2a230
2021.05.10 19:10:03.386 32031 32031 Debug ViewRootImpl@f750999[SignInHubActivity] Relayout returned: old=[0,0][1920,1080] new=[0,0][1920,1080] result=0x5 surface={valid=false 0} changed=true
2021.05.10 19:10:03.394 32031 32350 Debug AudioTrack Client defaulted notificationFrames to 1365 for frameCount 4096
2021.05.10 19:10:03.396 32031 32350 Warn AudioTrack Use of stream types is deprecated for operations other than volume control
2021.05.10 19:10:03.396 32031 32350 Warn AudioTrack See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case
2021.05.10 19:10:03.396 32031 32350 Info AudioTrack This process already got info. FadeIn[0] FadeOut[0] FadeInRing[0]
2021.05.10 19:10:03.404 32031 32031 Debug ViewRootImpl@1c95df6[UnityPlayerActivity] Relayout returned: old=[0,0][1920,1080] new=[0,0][1920,1080] result=0x1 surface={valid=true 534902071296} changed=false
2021.05.10 19:10:03.408 32031 32047 Debug ConnectivityManager requestNetwork; CallingUid : 10209, CallingPid : 32031
2021.05.10 19:10:03.410 32031 32031 Debug ViewRootImpl@f750999[SignInHubActivity] dispatchDetachedFromWindow
2021.05.10 19:10:03.410 32031 32031 Debug InputEventReceiver channel 'e0e0da2 com.IzGames.CrossWay/com.google.android.gms.auth.api.signin.internal.SignInHubActivity (client)' ~ Disposing input event receiver.
2021.05.10 19:10:03.410 32031 32031 Debug InputEventReceiver channel 'e0e0da2 com.IzGames.CrossWay/com.google.android.gms.auth.api.signin.internal.SignInHubActivity (client)' ~NativeInputEventReceiver.
2021.05.10 19:10:03.412 32031 32047 Error Unity Not signed
2021.05.10 19:10:03.412 32031 32047 Error Unity GamesServices:<Login>b__9_0(Boolean)
2021.05.10 19:10:03.412 32031 32047 Error Unity System.Action`1:Invoke(T)
2021.05.10 19:10:03.412 32031 32047 Error Unity System.Action`2:Invoke(T1, T2)
2021.05.10 19:10:03.412 32031 32047 Error Unity GooglePlayGames.<>c__DisplayClass33_0:<Authenticate>b__0(SignInStatus)
2021.05.10 19:10:03.412 32031 32047 Error Unity System.Action`1:Invoke(T)
2021.05.10 19:10:03.412 32031 32047 Error Unity System.Action`1:Invoke(T)
2021.05.10 19:10:03.412 32031 32047 Error Unity System.Action:Invoke()
2021.05.10 19:10:03.412 32031 32047 Error Unity GooglePlayGames.OurUtils.PlayGamesHelperObject:Update()
2021.05.10 19:10:03.412 32031 32047 Error Unity
2021.05.10 19:10:03.443 32031 32047 Info Unity [Play Games Plugin 0.10.12] 05.10.21 19:10:03 +03:00 DEBUG: Authentication canceled
2021.05.10 19:10:03.443 32031 32047 Info Unity
Код инициализации:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SocialPlatforms;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
public class GamesServices : MonoBehaviour
{
public string achievement_reach_75_points = "CgkI5_-Ti9AREAIQAg";
public string leaderboard = "CgkI5_-Ti9AREAIQAA";
public string achievement_reach_100_points = "CgkI5_-Ti9AREAIQAw";
public string achievement_reach_50_points = "CgkI5_-Ti9AREAIQAQ";
public bool mainScene = false;
public bool once = false;
public bool logged = false;
// Start is called before the first frame update
void Awake()
{
int n = FindObjectsOfType<GamesServices>().Length;
if (n != 1)
{
Destroy(this.gameObject);
}
else
{
DontDestroyOnLoad(gameObject);
}
}
private void Start()
{
Debug.Log(Social.localUser.authenticated);
}
// Update is called once per frame
public void Login()
{
if (mainScene && !once)
{
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().EnableSavedGames().Build();
PlayGamesPlatform.InitializeInstance(config);
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
Social.localUser.Authenticate((bool success) =>
{
if (success)
{
Debug.Log("Signed");
((GooglePlayGames.PlayGamesPlatform)Social.Active).SetGravityForPopups(Gravity.BOTTOM);
logged = true;
}
else
{
Debug.LogError("Not signed");
logged = false;
}
});
once = true;
}
}
public void ReportScore()
{
Social.ReportScore(PlayerPrefs.GetInt("Best"), leaderboard, (bool success) =>
{
if (success)
{
Debug.Log("Success");
}
});
}
public void Achievement(string id, int score)
{
if (PlayerPrefs.GetInt("Best") >= score && PlayerPrefs.GetInt(id) == 0)
{
PlayerPrefs.SetInt(id, 1);
Social.ReportProgress(id, 100.0f, (bool success) => { });
}
else
{
return;
}
}
public void ShowLeaderboard()
{
Debug.Log("ShowimgLead");
Social.ShowLeaderboardUI();
}
public void ShowAchievements()
{
Debug.Log("ShowimgAchiv");
Social.ShowAchievementsUI();
}
}