GetOfferAsync

public void GetOfferAsync(
    string player_uuid,
    Action<int> callback
);

설명

오퍼 내용을 비동기로 가져와 클라이언트 DB에 저장합니다. 게임 로딩 시 사용할 수 있습니다.

GetOffersAsync는 최소 TentuPlaySettings.offersGetInterval만큼의 시간 간격을 두고 호출되어야 합니다. 이 조건이 충족되지 않으면 유니티 에디터 콘솔 TentuPlay debug mode에서 다음과 같은 메시지가 출력됩니다.

TPDebug||GetOffersAsync started but too soon to send : GetOffersAsyncTs

호출이 성공한 경우 1이, 실패한 경우 -1이 반환됩니다. 호출에 실패할 경우 유니티 에디터 콘솔 TentuPlay debug mode에서 다음과 같은 메시지가 출력됩니다.

TPError||Error while getting offer: ERROR_MESSAGE

파라미터

이름 설명 필수 여부

player_uuid

플레이어의 고유 ID(캐릭터 ID가 아닌)로 Steam 사용자 ID나 Google Play 사용자 ID를 말함

필수

callback

성공할 경우 1, 실패할 경우 -1

필수