我在Unity编辑器中开发了一个iOS游戏,在Unity编辑器中is also playable
开发了iOS游戏,并在iOS(Xcode)中进行了Build&Run游戏。构建成功,但是游戏无法正常运行。这就是为什么我决定调试功能,然后在Xcode(NOT IN UNITY
)中遇到以下错误的原因:
NullReferenceException:空值 发现对象实例所在的位置 需要。在 BallScript.MobileControl()[0x00000] 在:0
(文件名: 目前在il2cpp上不可用 行:-1)
导致这些错误的原因是什么,我该怎么办?
答案 0 :(得分:0)
This means the code in the MobileControl
method in the BallScript
class is trying to use a null
value somewhere. I'd recommend debugging the code to better understand what is happening. You need to be using Unity 2018.2 or later to debug C# code on iOS. You can see directions about how to do that here: https://docs.unity3d.com/Manual/ManagedCodeDebugging.html
Note that the (Filename: currently not available on il2cpp Line: -1)
is benign. It is unrelated to the specific error in this case, and you can ignore it.