小编mha*_*ruz的帖子

当前上下文中不存在名称“Array”

有谁知道我为什么会收到这个错误?这在将我的项目升级到新版本的 Unity3d 后显示。

错误 CS0103:名称“Array”在当前上下文中不存在

#if IAP && UNITY_PURCHASING
private void OnItemPurchased(IAPItem item, int index)
{
    // A consumable product has been purchased by this user.
    if (item.productType == PType.Consumable)
    {
        CurrencyController.CreditBalance(item.value);
        Toast.instance.ShowMessage("Your purchase is successful");
        CUtils.SetBuyItem();
        if(Array.IndexOf(Purchaser.instance.iapItems, item) >= 1)
        {
            CUtils.SetRemoveAds(true);
        }
    }
    // Or ... a non-consumable product has been purchased by this user.
    else if (item.productType == PType.NonConsumable)
    {
        // TODO: The non-consumable item has been successfully purchased, grant this item to the player.
    }
    // …
Run Code Online (Sandbox Code Playgroud)

c# unity-game-engine

9
推荐指数
1
解决办法
7150
查看次数

标签 统计

c# ×1

unity-game-engine ×1