Notice
Recent Posts
Recent Comments
Link
스토리지
[06.30] Firebase 사용하기 본문
https://firebase.google.com/docs/unity/setup?hl=ko
Unity 프로젝트에 Firebase 추가
Unity 프로젝트에 Firebase 추가plat_iosplat_androidplat_unity Firebase Unity SDK를 활용하여 Unity 게임을 업그레이드 해보세요. Firebase를 Unity 프로젝트에 연결하는 것이 얼마나 간편한지 보여드리기 위해 Google
firebase.google.com
Firebase.Auth Package Import
if (result == SignInStatus.Success)
{
var localUser = (PlayGamesLocalUser)Social.localUser;
var googleIdToken = localUser.GetIdToken();
Firebase.Auth.FirebaseAuth auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
Firebase.Auth.Credential credential = Firebase.Auth.GoogleAuthProvider.GetCredential(googleIdToken, null);
auth.SignInWithCredentialAsync(credential).ContinueWith(task =>
{
if (task.IsCanceled)
{
Debug.LogError("SignInWithCredentialAsync was canceled.");
return;
}
if (task.IsFaulted)
{
Debug.LogError("SignInWithCredentialAsync encountered an error: " + task.Exception);
return;
}
Firebase.Auth.FirebaseUser newUser = task.Result;
Debug.LogFormat("User signed in successfully: {0} ({1})", newUser.DisplayName, newUser.UserId);
});
}
'개발일지' 카테고리의 다른 글
[07.07] 코루틴을 사용하지 않고 이미지에 Fade In / Fade Out 효과 넣기 (0) | 2021.07.07 |
---|---|
[07.04] Node.js - Winston으로 logging하기 (0) | 2021.07.04 |
[06.14] AWS EC2를 이용해서 웹서버 배포하기 - 03 (0) | 2021.06.14 |
[06.14] AWS EC2를 이용해서 웹서버 배포하기 - 02 (0) | 2021.06.14 |
[06.14] AWS EC2를 이용해서 웹서버 배포하기 - 01 (0) | 2021.06.14 |
Comments