Search Unity

4.6 to 5 conversion issue: NavMeshManager Crowd.Proximity.Collect

Discussion in 'Navigation' started by AdamMatheny, May 16, 2015.

  1. AdamMatheny

    AdamMatheny

    Joined:
    May 16, 2015
    Posts:
    4
    Some time back, I was working on a game in Unity 4.6 that relied very heavily on the use of the built in Unity NavMesh system. The game was completed and shipped, but now I'm looking into re-releasing the game and in doing so, I've updated to Unity 5. In Unity 5 though, the game now suffers from a tremendous drop in frame rate (as in 5 to 10 seconds per frame as opposed to 30-60 frames per second).

    Running the deep profiler points me towards a process called "Crowd.Proximity.Collect" under the NavMeshManager which appears to be pretty much entirely responsible for the drop in performance. While I normally find Unity to be well-documented, I haven't been able to find anything related to this process.

    Interestingly enough this only seems to happen when all of the NavMesh Agents in the scene are idle. If the player starts moving, this Crowd.Proximity.Collect process goes away and the frame rate returns to normal levels.

    Screenshots of the profiler are attached.
     

    Attached Files:

  2. mecgouki

    mecgouki

    Joined:
    Aug 8, 2014
    Posts:
    1
    Unfortunately, I met the same problem with u. I have 3 agent in the game. When all of them are idling, the FPS drops greatly. Profiler tells the "Crowd.Proximity.Collect" appears to be the key of it.

    Interestingly, when One Agent moves, the FPS seems to return to normal levels.
     
  3. Jakob_Unity

    Jakob_Unity

    Joined:
    Dec 25, 2011
    Posts:
    269
    Do you happen to have tiny radii for the idle agents ? - that could cause the issue. I'll get that fixed asap.
    If you don't have small radii - plz report a bug and PM me a case #.
     
  4. DigiScot

    DigiScot

    Joined:
    Aug 23, 2013
    Posts:
    27
    Your spot on Jakob, I've been battling with this all day, this is the first post I managed to find finally that had the same issue, and sure enough as soon as I upped the NavMeshAgent radius, it fixed it instantly.

    Not a biggie now, but look forward to that fix :) thanks!
     
  5. Jakob_Unity

    Jakob_Unity

    Joined:
    Dec 25, 2011
    Posts:
    269
    If you for some reason need tiny agent sizes, here's a workaround: place a an empty GO above/below the scene (to avoid interference with agents) and add a NavMeshObstacle component to the empty GO. Sorry for the trouble.
     
  6. shrinidhi666

    shrinidhi666

    Joined:
    Apr 18, 2014
    Posts:
    7
    I am having a very similar issue . I tried your workaround and navmeshmanager is still taking up resources in the profiler .
    Components.NavMeshAgent.TransformChangedMessage is taking lot of resources while idle .
     
  7. AdamMatheny

    AdamMatheny

    Joined:
    May 16, 2015
    Posts:
    4
    Thanks for the replies. For some reason I only got an email notification the first time a message was posted (mecgouki's message).
    Our agents do have tiny radii, because we wanted the characters to be able to move through each other. I'll try out that workaround.