Error ,当我单击“购买”以切换到新场景后,出现此错误。我能做什么?这是单位错误吗?还是因为脚本?
TypeLoadException:无法解析令牌为01000025的类型(来自typeref,类/程序集SimpleJson.SimpleJson,UnityEngine,Version = 0.0.0.0,Culture = neutral,PublicKeyToken = null) UnityEngine.Purchasing.PurchasingManager.OnPurchaseSucceeded(System.String ID,System.String收据,System.String transactionId)(位于
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class PurchaseScript : MonoBehaviour
{
public void BuyComplete(UnityEngine.Purchasing.Product product)
{
Application.LoadLevel("51");
}
public void BuyFailed(UnityEngine.Purchasing.Product product, UnityEngine.Purchasing.PurchaseFailureReason fa)
{
Debug.Log("PURCHASE FAILED");
}
}
答案 0 :(得分:0)
我相信加载场景的“正确”方式与您的代码使用不推荐使用的功能有些不同。尝试看一下:https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadScene.html