Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

(Case 946946) Dynamic Batching not working in a Player

Discussion in '2017.2 Beta' started by Peter77, Aug 31, 2017.

  1. Peter77


    QA Jesus

    Jun 12, 2013
    Dynamic Batching is not working in a build, but does work in the editor. The included test-scene is made of a bunch of Cubes and a static camera. Each cube contains 24 vertices according to Unity's Mesh Inspector.



    • Open user attached project
    • Open Player Settings and notice Dynamic Batching is enabled
    • Press File/Build & Run to build a Windows Standalone 64bit player
    • Start Player
    • Connect and enable Profiler to running Player
    • Select "Rendering" tab
    Observe "Dynamic Batching" shows "Batched Draw Calls: 0" always.
    • Quit Player and switch back to Unity Editor
    • Press Play in editor
    • Connect and enable Profiler to running game in Editor
    • Select "Rendering" tab
    Observe "Dynamic Batching" shows "Batched Draw Calls: 797" always.

    I've reproduced this issue with 2017.2.0b9 on Windows 64bit Standalone, UWP Windows and XboxOne.

    Dynamic Batching should work in a build.
  2. vandreev


    Unity Technologies

    Mar 2, 2016
    Hi Peter,

    In a nutshell, graphics jobs are currently not compatible with dynamic batching.

    The longer version is that we do not recommend using dynamic batching on modern platforms to begin with (including those that would benefit from graphics jobs).

    The GPU side performance improvement tends to be vanishingly small, while the CPU overhead can be quite significant, because dynamic batching requires that all batched objects are transformed into world space on the CPU. Since the draw call overhead tends to be fairly low on modern platforms, this usually results in a net performance loss.

    Hope that helps,

    PhilSA likes this.
  3. PhilSA


    Jul 11, 2013
    Has Unity considered making the engine's default settings appropriate for high-end games? Or maybe having the option to select the default quality level when creating a project? (linear color space, no dynamic batching, defferred rendering, GPU Skinning, Graphics jobs, etc...)

    As for dynamic batching, it would be very pertinent to make it very clear that it is not a good thing to have in 99% of cases, and that it breaks graphics jobs. Otherwise people will see it and just say "Sure, I'll take that fancy-sounding graphics thingy"

    I feel like so many less-than-expert users are missing out on immense quality+performance gains in Unity simply because they aren't aware of all this
    Last edited: Sep 25, 2017
  4. Peter77


    QA Jesus

    Jun 12, 2013
    Hi Vlad, thanks for your reply.

    It would cause less confusion if Unity displays a message next to the "Dynamic Batching" setting, if it isn't going to work, due to enabled Graphics Jobs for example. Plus, the editor shouldn't make use of dynamic batching as well in this case. It's odd if it works in the editor, but not in a build or visa versa.

    Adding this information to the documentation sounds like it makes sense.

    Furthermore, it's unsatisfying if the engine dictates whether to support such feature. I, as a developer, would like to make that call after having measured performance with and without dynamic batching instead.
    ROBYER1 likes this.