다음에 추가할 기능
플레이어 프로필
플레이어의 아바타, 프레임, 배지를 표시하세요.
Unity

확인할 수 있는 결과
프로필을 다시 불러오면 선택한 아바타, 프레임 또는 배지가 표시됩니다.
이 단계의 동영상은 아직 없습니다. 안내와 MCP 요청은 바로 사용할 수 있습니다.
플레이어 프로필 사용
이 기능 구현하기
가이드는 미리 볼 수 있습니다. 실행하려면 활성 프로젝트 키가 필요합니다. 프로젝트 준비
SDK 설치와 프로젝트 설정 가져오기가 완료되고 플레이어가 로그인해야 합니다.
이 SDK 예제는 develop을 사용합니다. 필요한 API가 설치된 SDK에 있는지 확인하세요.
C#
1using UnityEngine;
2using PM.horizOn.Cloud.Core;
3using PM.horizOn.Cloud.Manager;
4
5// 이 스크립트를 첫 씬의 GameObject에 붙이세요.
6public class PlayerProfileDemo : MonoBehaviour
7{
8 async void Start()
9 {
10 // 준비: 초기화, 연결, 플레이어 로그인.
11 HorizonApp.Initialize();
12 await new HorizonServer().Connect();
13 await UserManager.Instance.SignUpAnonymous("PlayerName");
14
15 // horizOn: 프로필을 읽은 뒤 아바타, 프레임, 배지를 변경.
16 // Profile, unlocks and the cosmetics catalog of the signed in player
17 var profile = await PlayerProfileManager.Instance.GetProfile();
18 if (profile == null) { Debug.Log(PlayerProfileManager.Instance.LastErrorCode); return; }
19
20 // Save avatar, frame and up to three badges (ids from your catalog in the dashboard)
21 var updated = await PlayerProfileManager.Instance.SetProfile(
22 "avatar.zombie_07", profile.profile.frameId, new[] { "badge.supporter" });
23 }
24}
새 기능을 테스트하세요.
프로필을 다시 불러오면 선택한 아바타, 프레임 또는 배지가 표시됩니다.
게임 설정과 같은 프로젝트를 대시보드에서 선택하세요.


