1、GameObjject find 只能find active 是TRUE的物体
bug13122101
ngReferenceException: The object of type 'Transform' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.antMove16.Update () (at Assets/Script/ant/antMove16.cs:82)
原因是 mayi= transform. Find("MaYi").transform; 第一个transform写成了gameobject
bug13122501
SetDestination" can only be called on an active agent that has been placed on a NavMesh
本文探讨了Unity3D中GameObjectFind方法的使用限制及其仅能查找活动物体的问题。通过具体案例分析了引用异常错误产生的原因,并给出了正确的代码实现方式。此外,还讨论了一个关于路径点设置的常见问题。
9886

被折叠的 条评论
为什么被折叠?



