这两天刚开始学Unity,这个错误就一下子犯了两次,其实一点技术术含量都没有,写下来是第一大原因是自己搜了两遍都是在官网看的英文解答..英语小渣表示略感痛苦;第二个原因是,切记,不要再犯了..
Unity进入运行的状态,可以说编译至少是没有问题的,但是运行中有错误便会自动暂停,于是乎,我自动暂停了,微笑.jpg,而且还白到去搜为什么Unity会自动暂停,狗带.jpg,最后面在console台发现了这个错误:
UnassignedReferenceException: The variable ball of ray has not been assigned.
You probably need to assign the ball variable of the ray script in the inspector.
UnityEngine.Object.Internal_InstantiateSingle (UnityEngine.Object data, Vector3 pos, Quaternion rot) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineObjectBindings.gen.cs:60)
UnityEngine.Object.Instantiate (UnityEngine.Object original, Vector3 position, Quaternion rotation) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:80)