ShowOfferById
public IEnumerator ShowOffer(
GameObject tpPersonalizedOfferControllerGameObject,
string player_uuid,
string language,
int offer_id,
Action<int> callback
);
Description
ShowOfferById shows the offers to players on screen by offer_id that can be retrieved by using SelectOfferInfo.
-
If the offer retrieved by
ShowOfferByIdis an AI in-game shop offer,-
TentuPlayAIOffer.cs’s
PlaceOfferis called. -
TentuPlayAIOffer.prefab in Assets/TentuPlay/TPPersonalizedOfferTemplates/Resources is retrieved and shown on screen.
-
-
If the offer retrieved by
ShowOfferByIdis a personalized offer,-
TentuPlayManualOffer.cs’s
PlaceOfferis called. -
TentuPlayOffer_landscape.prefab or TentuPlayOffer_portrait.prefab in Assets/TentuPlay/TPPersonalizedOfferTemplates/Resources is retrieved dynamically and shown on screen.
-
-
If there are no offers for the player, nothing is shown on screen.
|
For more information, please refer to the TentuPlayAIOffer.cs or TentuPlayManualOffer.cs script depending on the offer type. You also can edit these two scripts, if necessary. |
Parameters
| Name | Description | Required |
|---|---|---|
tpPersonalizedOfferControllerGameObject |
Game object of TPOfferController |
Required |
player_uuid |
Player’s unique ID (not a character’s ID) such as Steam user ID and Google Play user ID |
Required |
language |
Two-letter language code that you set up in personalized offer console |
Required |
offer_id |
Unique ID assigned to the offer |
Required |
callback |
1 if succeeded, -1 if failed |
Required |