From 282b4ad4572130e9b0f81eee93b0ff29a4dedb3f Mon Sep 17 00:00:00 2001 From: Anton Kesy Date: Mon, 30 May 2022 09:54:30 +0200 Subject: [PATCH] auto sign in at start --- .../Assets/Scripts/TapHeading/Game/GameManager.cs | 1 + .../TapHeading/Services/Google/GooglePlayServicesManager.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/TapHeadingAndroid/Assets/Scripts/TapHeading/Game/GameManager.cs b/TapHeadingAndroid/Assets/Scripts/TapHeading/Game/GameManager.cs index 52d48ce..af24f92 100644 --- a/TapHeadingAndroid/Assets/Scripts/TapHeading/Game/GameManager.cs +++ b/TapHeadingAndroid/Assets/Scripts/TapHeading/Game/GameManager.cs @@ -35,6 +35,7 @@ private void Start() var inputDebug = gameObject.AddComponent(); inputDebug.AddListener(this); #endif + GooglePlayServicesManager.Instance.SignIn(); } private void LoadFlagsFromPlayerPrefs() diff --git a/TapHeadingAndroid/Assets/Scripts/TapHeading/Services/Google/GooglePlayServicesManager.cs b/TapHeadingAndroid/Assets/Scripts/TapHeading/Services/Google/GooglePlayServicesManager.cs index 13a338d..fd57b29 100644 --- a/TapHeadingAndroid/Assets/Scripts/TapHeading/Services/Google/GooglePlayServicesManager.cs +++ b/TapHeadingAndroid/Assets/Scripts/TapHeading/Services/Google/GooglePlayServicesManager.cs @@ -158,5 +158,10 @@ public void GetHighScore(ISignInListener listener) } }); } + + public void SignIn() + { + PlayGamesPlatform.Instance.Authenticate(SignInInteractivity.CanPromptOnce, result => { }); + } } } \ No newline at end of file