// Update is called once per frame void Update() { if (objectTest.remainingDistance < 0.1f) { objectTest.SetDestination(NavMeshPoints.RandomPosition()); } }
// Start is called before the first frame update void Start() { var navMeshDatas = (new List <NavMeshData> { data }); NavMeshPoints.UpdatePositions(navMeshDatas); }