Search Unity

Unity 4: meshrenderer.renderdynamicbatch (dynamic batching) performance in the editor

Discussion in 'Scripting' started by Evan-Greenwood, Dec 13, 2012.

  1. Evan-Greenwood

    Evan-Greenwood

    Joined:
    Aug 6, 2008
    Posts:
    98
    I've been trying out Unity 4 with a trial.

    The dynamic batching in the editor, which was running at a negligible performance cost in Unity 3.5, is now suddenly taking up 93% of the CPU (at 66 milliseconds and 82% self) and the game drops below 15fps.

    (In the profiler it lists this as meshrenderer.renderdynamicbatch. Turning Dynamic Batching on and off in settings turns the performance sucking on and off)

    There are about 130 drawcalls in the scene with 200 batched drawcalls. There are only 2.6K tris or so with 4.2K verts. The scene is mostly made up of tiles that are quads (it is a 2D tile based game).

    This only happens in the editor. It seems fine in a build.

    Has anyone else experienced this or knows why this would happen?
     
  2. minionnz

    minionnz

    Joined:
    Jan 29, 2013
    Posts:
    391
    Hey, I've had a similar issue. I had 24 cubes in the scene and my frame rate dropped to around 15fps, and meshrenderer.renderdynamicbatch was taking up 99% CPU when dynamic batching was turned on.

    Not sure if you're still having the issue, but just in case anyone else runs into it: Check your shaders. My blocks were using a bumped diffuse shader without selecting a normal map. Switching to diffuse or adding a normal map solved the problem for me.