기술 자료

지원

Authentication

Open Unity Dashboard

Authentication

익명 로그인 사용

Implement anonymous sign-in to create new players without requiring any sign-in credentials or player input.
읽는 시간 1분최근 업데이트: 한 달 전

익명 로그인은 플레이어의 입력 없이 게임 세션에 새 플레이어를 생성합니다. 따라서 플레이어가 빠르게 게임을 시작할 수 있습니다. SDK에 캐시된 세션 토큰이 존재하는 경우, 플레이어가 익명으로 로그인했는지 플랫폼 계정을 통해 로그인했는지에 관계없이
SignInAnonymouslyAsync()
메서드가 캐시된 플레이어의 기존 자격 증명을 복구합니다. 플레이어 로그인 정보가 존재하지 않는 경우, SignInAnonymouslyAsync() 메서드가 새 익명 플레이어를 생성합니다.
참고: 특정 플랫폼의 계정에 연결되지 않은 익명 계정은 복구할 수 없습니다. 예를 들어, 플레이어가 게임을 설치 제거한 후 다시 설치하면 기존 익명 계정에 로그인할 수 없습니다. 다음 코드 샘플에서 플레이어가 게임에 익명으로 로그인한 후 액세스 토큰을 획득할 수 있도록 설정하는 방법을 볼 수 있습니다.
async Task SignInAnonymouslyAsync(){ try { await AuthenticationService.Instance.SignInAnonymouslyAsync(); Debug.Log("Sign in anonymously succeeded!"); // Shows how to get the playerID Debug.Log($"PlayerID: {AuthenticationService.Instance.PlayerId}"); } catch (AuthenticationException ex) { // Compare error code to AuthenticationErrorCodes // Notify the player with the proper error message Debug.LogException(ex); } catch (RequestFailedException ex) { // Compare error code to CommonErrorCodes // Notify the player with the proper error message Debug.LogException(ex); }}
익명 로그인을 성공적으로 구현한 후, 필요 시 플레이어가 다른 기기에서 게임 진행률을 이어가거나 계정을 복구할 수 있도록 지원되는 ID 제공업체(ID 제공업체 페이지 참고) 중 적어도 하나와 연동할 것을 권장합니다.