1
我想提出一个游戏的团结和它抛出“无法创建代理,因为没有有效的导航网格”,我不知道问题是什么错误。NavMeshAgent团结不工作
using UnityEngine;
using System.Collections;
public class EnemyMotion : MonoBehaviour {
public NavMeshAgent agent;
public Rigidbody rb;
public GameObject otwt;
void Start() {
rb = GetComponent<Rigidbody>();
agent = GetComponent<NavMeshAgent>();
}
void Update() {
gameObject.transform.Rotate(270, 0, 0);
agent.SetDestination(otwt.transform.position);
}
}
你加载一个场景相加? – andeart
你喝过NavMesh吗? (导航 - >烘烤) –