GetOfferAsync

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

Description

GetOfferAsync retrieves an offer content asynchronously and saves it to the client’s database. It can be used while the game is loading.

GetOffersAsync must be called only after a certain amount of time configured in TentuPlaySettings.offersGetInterval has passed. If not, the following message will be printed on the Unity editor console in TentuPlay debug mode.

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

It returns 1 for success and -1 for failure. If -1 is returned, you can see the following message in the Unity editor console in TentuPlay debug mode:

TPError||Error while getting offer: ERROR_MESSAGE

Parameters

Name Description Required

player_uuid

Player’s unique ID (not a character’s ID) such as Steam user ID and Google Play user ID

Required

callback

1 if succeeded, -1 if failed

Required