기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

In-App Purchasing

IAP 클라이언트 API

IAP SDK API

웹숍 관리자 API

웹숍 클라이언트 API

In-App Purchasing

LiveOps
​
​
시작하기
  • 개요
  • IAP 소개
  • IAP v5의 새로운 사항
  • IAP v4에서 v5로 업그레이드
소비자 (D2C)에 대한 직접 결제
  • 소비자 (D2C) 결제 제공업체에게 직접 제공
    • D2C 결제 공급자 워크플로 통합
      • Create Remote Catalog
      • Initialize services to handle the start up sequence
      • Fetch Remote Catalog
      • Configure a webhook or Cloud Code module for purchase fulfillment
      • Configure your payment provider
      • Add a routing rule
      • Fulfill purchases
      • Test your integration
    • 구매 시작
    • Apple 및 Google 외부 구매 요구 사항 준수
    • 딥 링크 성공 URL 예시
웹숍
  • 개요
  • 시작하기
  • 빌드 및 퍼블리시
  • 구성
  • 게임에 연결
  • 관리자
  • 웹숍 문제 해결
플랫폼 네이티브 스토어
  • 플랫폼 네이티브 스토어에 대한 IAP 설정
  • 코드리스 IAP
카탈로그 및 스토어 관리
  • 제품 카탈로그 생성
  • 지원되는 스토어
  • 레퍼런스
Purchases
  • 구매 관리 및 이행
IAP 성능 모니터링
  • 개요
  • IAP 수익 성과
  • D2C 성능
개인정보
  • 개인정보 보호 및 동의
  1. Unity 인앱 구매
  2. 소비자에게 직접 결제하는 (D2C) 제공업체

시작 시퀀스를 처리하기 위해 서비스를 초기화합니다.

Unity Gaming Services, Authentication, In-App Purchasing을 (IAP) 초기화하여 소비자 간 직접 (D2C) 결제 제공업체와 연동할 수 있습니다.
읽는 시간 2분
최근 업데이트: 2달 전

IAP의 시작 시퀀스를 처리하기 위해 UGS(Unity Gaming Services)를 초기화하는 스크립트를 생성합니다. 이 시작 스크립트는 다음을 수행할 수 있습니다.
  1. Unity Gaming Services를 초기화합니다.
  2. Authentication 이벤트 핸들러를 설정합니다.
  3. 로그인.
  4. IAP를 초기화하고 원격 카탈로그를 가져옵니다. 자세한 내용은 원격 카탈로그 페치를 참고하십시오.
참고
UGS를 초기화하기 전에 환경을 설정합니다.
초기화 스크립트에서 인스펙터에서
PurchaseManager
컴포넌트를 할당해야 합니다.
PurchaseManager
컴포넌트는 다음 Remote Catalog 페치 단계의 일부로 생성됩니다.

서비스 초기화 예제 스크립트

다음 예제 스크립트의 이름은
ServiceOrchestrator
입니다.
중요
세션 토큰이 손실된 후 구매가 지속되지 않으므로 익명 로그인을 인증 방법으로 사용하지 않는 것이 좋습니다. 마찰이 없는 플랫폼별 제공자가 앱에서 실현할 수 없는 경우 애니메이션 인증 및 연결을 참조하십시오.
using System;using System.Threading.Tasks;using Unity.Services.Authentication;using Unity.Services.Core;using UnityEngine;// Ensure you have reference to your PurchaseManager namespace if applicablepublic class ServiceOrchestrator : MonoBehaviour{ // Assign this in the Inspector public PurchaseManager purchaseManager; async void Awake() { try { { // 1. Unity Gaming Services 초기화 await Unity.Services.Core.UnityServices.InitializeAsync(); // 2. Auth 이벤트 핸들러 설정 SetupEvents(); // 3. 로그인 await SignUpAnonymouslyAsync(); // 4. IAP 초기화 및 페치 카탈로그 await purchaseManager.InitializeIAP(); } catch(기타 e) { Debug.LogException(e); } } // Setup authentication event handlers if desired void SetupEvents() { AuthenticationService.Instance.SignedIn += () => { // Shows how to get a playerID Debug.Log($"PlayerID: {AuthenticationService.Instance.PlayerId}"); // Shows how to get an access token Debug.Log($"Access Token: {AuthenticationService.Instance.AccessToken}"); }; AuthenticationService.Instance.SignInFailed += (err) => { Debug.LogError(err); }; AuthenticationService.Instance.SignedOut += () => { Debug.Log("Player signed out."); }; AuthenticationService.Instance.Expired += () => { Debug.Log("Player session could not be refreshed and expired."); }; } // Sign in async Task SignUpAnonymouslyAsync() { try { { await AuthenticationService.Instance.SignInAnonymouslyAsync(); Debug.Log("Sign in anonymously succeeded!"); Debug.Log($"PlayerID: {AuthenticationService.Instance.PlayerId}"); } catch(AuthenticationException ex) { // Compare error code to AuthenticationErrorCodes Debug.LogException(ex); } catch(RequestFailedException ex) { // Compare error code to CommonErrorCodes Debug.LogException(ex); } }}

다음 단계

이 페이지는 IAP를 사용하여 D2C 결제 제공업체를 설정하는 워크플로의 일부입니다. 이 워크플로를 계속하려면 다음 옵션 중 하나를 선택합니다.
Integrate D2C payment providers
Integrate D2C payment providers with IAP 워크플로 페이지로 돌아갑니다.
Fetch your Remote Catalog
워크플로의 다음 단계로 이동하여 D2C 결제 제공업체를 설정합니다.

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • 서비스 초기화 예제 스크립트

    • 다음 단계


이 페이지의 문제 보고