12345678910111213141516171819202122232425262728 |
- using UnityEngine;
- using System.Collections;
- using ICTS.Localization;
- using TMPro;
- public class BuyLabel : MonoBehaviour
- {
- public StoreProductId productId;
- TextMeshProUGUI label;
- void Awake()
- {
- label = GetComponent<TextMeshProUGUI>();
- }
- void OnEnable()
- {
- IAPProduct product = StoreManager.Instance.GetProduct(productId);
- if (product != null)
- {
- label.text = string.Format(Localization.instance.Get("button.label.buyProduct"), product.currencyCode+product.price);
- } else
- {
- label.text = Localization.instance.Get("button.label.buyProductNoPrice");
- }
- }
- }
|