교차 플랫폼 구매 방식에 적합하지 않은, 예를 들면, Apple 스토어에서 앱 영수증을 새로고침하는 기능과 같은 추가 기능을 스토어가 제공하도록 할 수 있습니다.
이 경우 IStoreExtension
인터페이스를 자체적으로 구현하는 추가 확정 기능 정의 인터페이스를 아래와 같이 생성해야 합니다.
/// <summary>
/// Functionality specific to my store.
/// </summary>
public interface IMyExtensions : IStoreExtension
{
// Hypothetical method for a store that provides User IDs.
String GetUserStoreId();
}
애플리케이션은 IExtensionProvider
를 통해 추가 기능을 요청합니다. 이 경우 Unity IAP는 우선 요청 타입에 대한 액티브 스토어 구현 실행을 시도합니다.
이 시도가 실패하면 Unity IAP는 RegisterExtension
을 통해 제공한 스토어 모듈 호출을 통해 등록된 인스턴스를 제공하거나, 인스턴스가 제공되지 않은 경우 null 값을 반환합니다.
모듈은 지원되지 않는 플랫폼에서 실행되는 경우에도 확장 인터페이스 인스턴스를 제공해야 합니다. 개발자가 특정 플랫폼에 대한 컴파일을 진행하도록 할 필요가 없게 하기 위해서입니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.