docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PromotionPopupView

    Component that manages displaying a Transaction Item's promotion popup, including promotion image, display name and purchase button. When attached to a game object, it will display an image featuring the contents of the Transaction Item's rewards (or a specified image), the Transaction Item's displayName and create and display a PurchaseButton (PurchaseButton) to complete purchase transactions for it.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    PromotionPopupView
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(string)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.GameFoundation.UI
    Assembly: solution.dll
    Syntax
    [AddComponentMenu("Game Foundation/Promotion Popup", 2)]
    [ExecuteInEditMode]
    public class PromotionPopupView : MonoBehaviour

    Fields

    Name Description
    onPopupClosed

    Callback that will get triggered when the Promotion Popup is closed.

    onPopupOpened

    Callback that will get triggered when the Promotion Popup is opened.

    onTransactionFailed

    A callback that will get triggered if a purchase for any item in the store fails.

    onTransactionSucceeded

    A callback that will get triggered if a purchase for any item in the store completes successfully.

    Properties

    Name Description
    autoGeneratePromoImage

    Determines whether or not the promotion's image will be auto-generated. If true (default), the image will be generated using the sprite asset name's for each inventory or currency item listed in the transaction's Rewards. If false, the Promotion Sprite Name will be used to get the image from the transaction's Asset detail.

    autoGeneratedImageContainer

    The Transform in which to auto generate promotion image. /// Used only when Auto Generate Promo Image is enabled.

    badgeField

    The ImageInfoView to assign the badge to.

    badgeTextPropertyKey

    The property key for the badge to be displayed in callout.

    currencyRewardCountPrefix

    The string to prefix the reward currency counts when auto generating the promotion image.

    descriptionPropertyKey

    The property key for the promotion description to be displayed.

    descriptionTextField

    The Text component to assign the description to.

    itemRewardCountPrefix

    The string to prefix the reward inventory item counts when auto generating the promotion image.

    priceIconSpriteName

    The sprite asset name for price icon that will be displayed on the PurchaseButton, as specified in the asset detail for the inventory item or currency listed in the price.

    promoImageField

    The Image component to assign the Promotion Image to. Used only when Auto Generate Promo Image is disabled.

    promoImageSpriteName

    The sprite asset name for the promotion image that will be displayed on this view, as specified in the transaction's Asset detail. Used only when Auto Generate Promo Image is disabled.

    purchaseButton

    The PurchaseButton to set with the TransactionItem's purchase info.

    rewardItemIconSpriteName

    The sprite asset name for the icon of the inventory or currency items listed in the transaction's Rewards, as specified in their Asset details. Used only when Auto Generate Promo Image is enabled.

    rewardItemPrefab

    The RewardItem prefab to use when auto generating promotion image.

    separatorPrefab

    The GameObject to use as a separator between RewardItems when auto generating promotion image.

    titleTextField

    The Text component to assign the transaction's display name to.

    transactionKey

    The key of the Transaction Item being displayed.

    Methods

    Name Description
    Close()

    Hides the promotion popup. Will trigger a PopupClosedEvent (PromotionPopupView.PopupClosedEvent) and a PopupWillCloseEvent (PromotionPopupView.PopupWillCloseEvent).

    GetTransaction()

    Gets the transaction that is displayed by the PromotionPopupView.

    Open()

    Displays the promotion popup. Will trigger a PopupOpenedEvent (PromotionPopupView.PopupOpenedEvent).

    Open(string)

    Displays the promotion popup. Will trigger a PopupOpenedEvent (PromotionPopupView.PopupOpenedEvent).

    Open(string, bool)

    Displays the promotion popup. Will trigger a PopupOpenedEvent (PromotionPopupView.PopupOpenedEvent).

    SetAutoGenerateImage(bool)

    Sets whether the image used for the promotion should be auto generated or use an asset from the transaction's Asset Detail.

    SetAutoGeneratePromotionImage(string, string, string)

    Set the image used for the promotion should be auto generated.

    SetAutoGeneratedImageContainer(Transform)

    Sets the Transform in which to display the promotion's image on this view.

    SetBadgeField(ImageInfoView)

    Sets the Text component to display the promotion's badge on this view.

    SetBadgeTextPropertyKey(string)

    Sets the static property key that will be used when displaying the promotion's badge.

    SetDescriptionPropertyKey(string)

    Sets the static property key that will be used when displaying the promotion's description.

    SetDescriptionTextField(Text)

    Sets the Text component to display the promotion's description on this view.

    SetPriceIconSpriteName(string)

    Sets sprite asset name for price icon that will be displayed on Purchase Button (PurchaseButton).

    SetPromoImageField(Image)

    Sets the Image component to display the promotion image on this view.

    SetPromotionImage(string)

    Sets the promotion image asset name that will be used when displaying the user-provided promotion image and disable Auto Generate Promo Image (autoGeneratePromoImage).

    SetPurchaseButton(PurchaseButton)

    Sets PurchaseButton to be able to purchase Transaction Item by UI.

    SetRewardItemPrefab(ImageInfoView)

    The prefab to use for each when auto generating the promotion image.

    SetSeparatorPrefab(GameObject)

    Sets the prefab to use for as a separator when when auto generating the promotion image.

    SetTitleTextField(Text)

    Sets the Text component to display the transaction's display name on this view.

    SetTransactionKey(string)

    Sets the Transaction Item that should be displayed by this view.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)