void Start() { iapManager = GameObject.Find("IapManager").GetComponent <IapManager>(); if (iapManager != null) { Debug.Log("[HMSPlugin]: adding listener "); iapManager.addListener(activateProducts); } else { Debug.Log("[HMSPlugin]: NO IAP MANAGER IN SHOP"); } coinsText = GameObject.Find("CoinsText").GetComponent <Text>(); userText = GameObject.Find("UserText").GetComponent <Text>(); loginButton = GameObject.Find("LoginButton").GetComponent <Button>(); shopItemsGO = GameObject.Find("ShopItems"); if (!logged) { userText.text = "not logged"; } }
private void SignedIn(AuthHuaweiId authHuaweiId) { Debug.Log("[HMS]: SignedIn"); iapManager = GetComponent <IapManager>(); iapManager.OnCheckIapAvailabilitySuccess = LoadStore; iapManager.OnCheckIapAvailabilityFailure = (error) => { Debug.Log($"[HMSPlugin]: IAP check failed. {error.Message}"); }; iapManager.CheckIapAvailability(); }
// Start is called before the first frame update /// <summary> /// /// </summary> void Start() { Debug.Log($"[HMSPlugin]: IAP checkxxxx"); iapManager = GetComponent <IapManager>(); iapManager.OnCheckIapAvailabilitySuccess = LoadStore; iapManager.OnCheckIapAvailabilityFailure = (error) => { Debug.Log($"[HMSPlugin]: IAP check failed. {error.Message}"); }; iapManager.CheckIapAvailability(); Debug.Log($"[HMSPlugin]: IAP checkxxxx2"); }
private void Start() { iapManager = GameObject.Find("IapManager").GetComponent <IapManager>(); img = transform.Find("ItemImage").GetComponent <Image>(); nameText = transform.Find("ItemName").GetComponent <Text>(); priceText = transform.Find("ItemCost").GetComponent <Text>(); descText = transform.Find("ItemDesc").GetComponent <Text>(); img.sprite = itemImage; nameText.text = ""; priceText.text = ""; descText.text = ""; update = false; }