navmesh报错

275 阅读1分钟

navmesh报错

Failed to create agent because it is not close enough to the NavMesh

原因:当给模型添加NavMeshAgent脚本时报错。奇葩的是有的模型报错,有的模型不报错。原因是创建完模型时先添加的NavMeshAgent脚本后设置的位置,应该是先将模型设置到相应位置,然后添加脚本。