hi want to debug message only once, but it appers that the funciotn is called manny times instead of once
Could sombody kindly take a quick look at this simple script and point out whats the issue?
void Start () {
animator = GetComponent<Animator> ();
NPCagent = GetComponent < NavMeshAgent> ();
StartCoroutine(Wait(7));
}
// Update is called once per frame
void Update () {
//waypoint_X=
NPCagent.SetDestination (destination.position);
}
IEnumerator Wait(float waitTime){
yield return new WaitForSeconds(waitTime);
Debug.Log (" this massage should appire in console only once");
}