Skip to content

Commit e3d61bb

Browse files
author
盧彥辰
committed
feat: 修改按鈕初始值狀態判斷式
issue #6
1 parent 0bc1203 commit e3d61bb

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Assets/Script/Model/GoogleSignIn/GoogleSignInHandler.cs

+13-3
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ void Awake()
4343
}
4444

4545

46-
GoogleLoginButton.interactable = false;
47-
GoogleLogoutButton.interactable = false;
46+
4847

4948
//填入ClientID及可以取得id, token
5049
configuration = new GoogleSignInConfiguration
@@ -54,7 +53,18 @@ void Awake()
5453
};
5554

5655

57-
56+
if (GoogleSignIn.Configuration != null)
57+
{
58+
GoogleLoginButton.interactable = false;
59+
GoogleLogoutButton.interactable = false;
60+
}
61+
else
62+
{
63+
GoogleLoginButton.interactable = true;
64+
GoogleLogoutButton.interactable = false;
65+
}
66+
67+
5868
}
5969

6070
/// <summary>

0 commit comments

Comments
 (0)