void Set_Nav(TrueGodGameObject subj, Vector3 pos) { if (subj.Get_OBJ() == null) { return; } UnityEngine.AI.NavMeshAgent nav = subj.Get_OBJ().GetComponent <UnityEngine.AI.NavMeshAgent>(); nav.stoppingDistance = 1f; nav.speed = subj.Get_SPD(); nav.SetDestination(pos); }
void Set_Nav(TrueGodGameObject subj, TrueGodGameObject obj) { if (subj.Get_OBJ() == null || obj.Get_OBJ() == null) { return; } UnityEngine.AI.NavMeshAgent nav = subj.Get_OBJ().GetComponent <UnityEngine.AI.NavMeshAgent>(); nav.stoppingDistance = 1f; nav.speed = subj.Get_SPD(); nav.SetDestination(obj.Get_OBJ().transform.position); }