Well somehow after i tried to get into my game Google play game services, All of the levels get crashed except from the Endless level, i have 2 modes on my app right now,Rush mode(Endless Level),StoryMode(Levels), and before i started to add Google play games it all works fine, i even have a backup before i add the GPG i backup every time so i am luvky but i dont want to go back , i want to fix it, it got to be fixed
i got a logcat for the crash:
12-26 03:05:15.702: E/AndroidRuntime(10996): Process: com.BTech.RollingOver, PID: 10996
12-26 03:05:15.702: W/ActivityManager(1072): Force finishing activity com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity
12-26 03:05:15.712: V/ActivityManager(1072): Moving to PAUSING: ActivityRecord{448bc0c0 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity t369 f}
12-26 03:05:15.902: V/WindowStateAnimator(1072): performShowLocked: mDrawState=HAS_DRAWN in WindowStateAnimator{45dd6710 Application Error: com.BTech.RollingOver}
12-26 03:05:16.242: W/ActivityManager(1072): Activity pause timeout for ActivityRecord{448bc0c0 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity t369 f}
12-26 03:05:16.242: V/ActivityManager(1072): Moving to PAUSED: ActivityRecord{448bc0c0 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity t369 f} (due to timeout)
12-26 03:05:16.242: V/ActivityManager(1072): Moving to FINISHING: ActivityRecord{448bc0c0 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity t369 f}
12-26 03:05:16.252: D/ActivityManager(1072): allPausedActivitiesComplete: r=ActivityRecord{448bc0c0 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity t369 f} state=FINISHING
12-26 03:05:16.732: V/ActivityManager(1072): Moving to DESTROYING: ActivityRecord{448bc0c0 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity t369 f} (destroy requested)
12-26 03:05:17.772: W/WindowManager(1072): Force clearing orientation change: Window{44993118 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity}
12-26 03:05:17.792: I/WindowManager(1072): Screen frozen for +2s22ms due to Window{44993118 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity}
12-26 03:05:26.742: W/ActivityManager(1072): Activity destroy timeout for ActivityRecord{448bc0c0 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity t369 f}
12-26 03:05:26.742: V/ActivityManager(1072): Moving to DESTROYED: ActivityRecord{448bc0c0 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity t369 f} (removed from history)
12-26 03:05:51.272: I/ActivityManager(1072): Process com.BTech.RollingOver (pid 10996) has died.
12-26 03:05:51.272: I/WindowState(1072): WIN DEATH: Window{44993118 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity}
12-26 03:05:51.272: W/WindowManager(1072): Force-removing child win Window{4484fbe0 u0 SurfaceView} from container Window{44993118 u0 com.BTech.RollingOver/com.unity3d.player.UnityPlayerActivity}
And this is the code for activating GPG which never work for me it should pop a login for Google play games:
using UnityEngine;
using System.Collections;
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
using GooglePlayGames.BasicApi;
public class GPG : MonoBehaviour {
//-LeaderBoard-
public string leaderboardgpg = "CgkIls2S1dkZEAIQBg";
// Use this for initialization
void Awake () {
Social.localUser.Authenticate((bool success) => {
if (success) {
Debug.Log("You've successfully logged in");
} else {
Debug.Log("Login failed for some reason");
}
});
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
.Build();
PlayGamesPlatform.InitializeInstance(config);
// recommended for debugging:
PlayGamesPlatform.DebugLogEnabled = true;
// Activate the Google Play Games platform
PlayGamesPlatform.Activate();
}
// Update is called once per frame
void Update () {
}
public void CallForLeaderBoard(){
PlayGamesPlatform.Instance.ShowLeaderboardUI(leaderboardgpg);
}
}
Thanks for the Helpers!
↧