public void Update() { if (navMeshAgent.IsDestinationReached() && OnDestinationReached != null) { OnDestinationReached(agent); } }