Search Unity

Question How to get rid of, or reduce "SyncronizeSimulationToAgentTransforms" cost?

Discussion in 'Navigation' started by Peter77, Nov 21, 2020.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    I have 8 NavMeshAgents on a rather simple NavMesh. I turned off ObstacleAvoidance and instead use NavMeshAgent.Move to run my own avoidance during
    Update
    . Other than that, it's all standard Unity functionality what's going on.

    Sometimes
    SyncronizeSimulationToAgentTransforms
    kicks in with a high cost and I would like to know if there is a way to get rid of it, or last least make it faster. Perhaps by moving NavMeshAgent.Move in the update-order around or similar.

    I'm using Unity 2018.4.27f1 and the profiling data was captured on a Samsung Galaxy S6 mobile phone.

    upload_2020-11-21_21-19-56.png


    PS: I've also turned off Physics.autoSimulation and Physics.autoSyncTransforms if this makes a difference.