- Home /
The name `PurchaseManager' does not exist in the current context
When I run the code an error is displayed. How to solve this problem? Code: using UnityEngine;
public class StartBuy : MonoBehaviour {
private void Start (){
PurchaseManager.OnPurchaseNonConsumable += PurchaseManager_OnPurchaseNonConsumable;
}
private void PurchaseManager_OnPurchaseNonConsumable(UnityEngine.Purchasing.PurchaseEventArgs args){
print("Your purchase is successful");
}
} ,When I run the code an error is displayed. How to solve this problem? Code:
using UnityEngine;
public class StartBuy : MonoBehaviour {
private void Start (){
PurchaseManager.OnPurchaseNonConsumable += PurchaseManager_OnPurchaseNonConsumable;
}
private void PurchaseManager_OnPurchaseNonConsumable(UnityEngine.Purchasing.PurchaseEventArgs args){
print("Your purchase is successful");
}
}
Comment