NullReferenceException: Object reference not set to an instance of an object. at YooAsset.ResourcePackage.ConvertLocationToAssetInfo (System.String location, System.Type assetType) [0x00000] in <00000000000000000000000000000000>:0 at YooAsset.ResourcePackage.LoadRawFileAsync (System.String location) [0x00000] in <00000000000000000000000000000000>:0 at CosmosAR.FsmSceneResInitialize+<Prepare>d__6.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0 at CosmosAR.FsmSceneARInitialize+<Prepare>d__5.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0 CosmosAR.<Prepare>d__5:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
时间: 2024-02-01 15:12:22 浏览: 436
未将对象引用设置到对象的实例 (System.NullReferenceException)
5星 · 资源好评率100%
这是一个 NullReferenceException 异常,通常是因为尝试使用一个空对象的属性或方法所导致的。根据该异常信息中提供的堆栈跟踪,可以看到在 YooAsset.ResourcePackage.ConvertLocationToAssetInfo() 方法中出现了问题。可能是该方法中使用了一个没有实例化的对象。你需要检查代码中是否有未正确初始化的对象或变量。
阅读全文