I am currently working on a fire evacuation project using Unity Engine navmesh component. However, when I increase the number of agents, the performance of evacuation decreases significantly. Some agents are waiting very long time to evacuate. Do you know how can I solve this navmesh agent performance issue ?

Move your
SetDestinationtoStart().Based on the
NavMeshdocs, you are updating and recreating the agent's path every frame. I do not see a reason to do this unless yourhedefposition changes, which from what I can tell from your use case, it should not. If it does happen to change, then gradually ping units that the position has changed, so you do not have any stuttering when Unity recalculates their pathing.