Go To Console

Use Personalized Offer SDK

Prerequisite

Personalized offers requires TentuPlay SDK v2021.1 or higher.

TPPersonalizedOfferController

When ShowOfferById or ShowLatestOfferis called TPPersonalizedOfferController will display each player (player_uuid) and their respective offer on Canvas.

Example Code

public void ShowPersonalizedOffer()
    {
        TPPersonalizedOffer myTPOffer = new TPPersonalizedOffer();

        StartCoroutine(
            myTPOffer.ShowLatestOffer(tpPersonalizedOfferController, player_uuid, "en", (response) =>
            {
            }));
    }


[An image of the personalized offer message on screen]

  • Location: Assets/TentuPlay/TPPersonalizedOfferTemplates/TPPersonalizedOfferController.prefab

  • TPPersonalizedOfferController.cs script is a component

  • Placing a TPPersonalizedOfferController game object on the game's Canvas
  • used as the tpPersonalizedOfferControllerGameObject parameter value of ShowOfferById or ShowLatestOffer.
  • When ShowOfferById or ShowLatestOfferis called
    • Create a TentuPlayOffer_landscape or TentuPlayOffer_portrait as a child of TPPersonalizedOfferController (TPPersonalizedOfferController.ShowOffer)
    • Take the image URL entered into the console and through Offerimage's Texture/Raw Image (changes by version) change them dynamically

Offer UI

TentuPlayOffer_landscape, TentuPlayOffer_portrait components

TentuPlayOffer_landscape.prefab

(TentuPlayOffer_portrait is the same as TentuPlayOffer_landscape)

Scripts

MessageController: Script for opening or closing messages
TentuPlayOffer: TENTUPLAY script for personalized offers


Message Image: OfferImage

Match the size of the image entered into the console to the OfferImage size. The default size ofTentuPlayOffer_landscape and TentuPlayOffer_portrait are each 640x400, 400x640

Scripts

Call TentuPlayOffer.GoToOfferEvent with On Click()
*The UNITY 2017 SDK has a seperate OfferButton


Close Button

Scripts

Call TentuPlayOffer.CloseOfferEvent with On Click()


Toggle Do Not Show Again Button

Scripts

Call TentuPlayOffer.CheckDoNotShowToday with On Value Changed.
When changed to a button change so that MarkDoNotShowToday is used.

Do you need help?

Do you have questions? Join TENTUPLAY Discord if you have any questions.