ShowLastestOffer

public IEnumerator ShowOffer(
    GameObject tpPersonalizedOfferControllerGameObject,
    string player_uuid,
    string language,
    Action<int> callback
);

Description

ShowLastestOffer shows the most recent offer to players on screen.

  • If the offer retrieved by ShowLastestOffer is an AI in-game shop offer,

    • TentuPlayAIOffer.cs’s PlaceOffer is called.

    • TentuPlayAIOffer.prefab in Assets/TentuPlay/TPPersonalizedOfferTemplates/Resources is retrieved and shown on screen.

  • If the offer retrieved by ShowLastestOffer is a personalized offer,

    • TentuPlayManualOffer.cs’s PlaceOffer is 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

callback

1 if succeeded, -1 if failed

Required