다음에 추가할 기능
검증된 액션
서버에서 게임 동작을 검증하세요.
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 ValidatedActionsDemo : MonoBehaviour
7{
8 async void Start()
9 {
10 // 준비: 초기화, 연결, 플레이어 로그인.
11 HorizonApp.Initialize();
12 await new HorizonServer().Connect();
13 await UserManager.Instance.SignUpAnonymous("PlayerName");
14
15 byte[] inputLog = System.Array.Empty<byte>();
16
17 // horizOn: 런을 시작하고 입력을 기록한 뒤 검증된 점수를 제출.
18 // 1. Dashboard: turn on "Validated submissions only" for the board "weekly"
19 var va = ValidatedActionsManager.Instance;
20
21 // 2. Round start: single-use ticket plus server seed
22 var run = await va.StartRun("weekly");
23 if (run == null) { Debug.Log(va.LastErrorCode); return; } // e.g. RUN_RATE_LIMITED
24 var random = new System.Random(run.seed);
25
26 // ... play, record the inputs into inputLog (byte[]) ...
27
28 // 3. Round end: score plus input log (the SDK sends its SHA-256 hash)
29 var result = await va.SubmitValidated(18250, inputLog);
30 if (result == null)
31 {
32 Debug.Log($"{va.LastErrorCode}, run kept: {va.HasActiveRun}"); // e.g. DURATION_TOO_SHORT
33 }
34 }
35}
새 기능을 테스트하세요.
유효한 동작은 승인되고 유효하지 않은 동작은 거부됩니다.
게임 설정과 같은 프로젝트를 대시보드에서 선택하세요.


