기술 자료

지원

Authentication

Open Unity Dashboard

Authentication

프로필 관리

Create and manage multiple player profiles on a single device to allow players to sign in with different accounts.
읽는 시간 1분최근 업데이트: 한 달 전

플레이어는 프로필을 사용해 하나의 기기에서 여러 계정에 로그인할 수 있습니다. 프로필을 통해
PlayerPrefs
에 저장되는 값이 분리되어 저장됩니다. 프로필은 자동으로 유지되지 않습니다. 프로필을 어떻게 관리할지는 개발자가 결정해야 합니다.

프로필 전환

플레이어가 로그아웃한 상태에서만 현재 프로필을 전환할 수 있습니다.
AuthenticationService.Instance.SwitchProfile(profileName)
를 사용합니다. 프로필 이름은 영숫자 값, `-`, `_`만 지원하며 최대 길이는 30자입니다.
플레이어가 로그아웃하지 않은 상태라면
SwitchProfile
에서 에러 코드
AuthenticationErrorCodes.ClientInvalidUserState
AuthenticationException
이 발생합니다.
유효하지 않은 이름을 사용하면
SwitchProfile
에서 에러 코드
AuthenticationErrorCodes.ClientInvalidProfile
AuthenticationException
이 발생합니다.

현재 프로필

현재 프로필을 확인하려면
AuthenticationService.Instance.Profile
을 사용합니다.

기본 프로필

초기화 옵션에서 제공되는 프로필이 없는 경우
default
값이 사용됩니다.

초기화 시 프로필 설정

UnityServices
를 초기화할 때 선택 사항으로 프로필을 설정할 수 있습니다. 프로필이 제공되지 않은 경우
AuthenticationService
default
값을 사용합니다.
async Task InitializeUnityServices(){ var options = new InitializationOptions(); options.SetProfile(“test_profile”); await UnityServices.InitializeAsync(options);}