Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Dynamic Batching

Discussion in 'General Graphics' started by BinaryCats, Jul 17, 2018.

  1. BinaryCats

    BinaryCats

    Joined:
    Feb 8, 2016
    Posts:
    317
    Hello,

    I have a new/blank unity project, in that scene I create 2 cubes Create>3D Object>Cube from the documentation on dynamic batching, it implies that these cubes should be dynamically batched together. However the profiler shows they are not being batched (draw calls increase, and dynamic batches = 0).

    Is there any explanation of this? Is there some other setting that needs to be applied to the cube/project?

    I have read a few threads trying to understand this, but they go into depths much deeper than this, most simplest, test case

    Thanks
     
  2. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,074
    Are the cubes sharing the same material?
    And (if there are any), are they sharing the same texture?

    Note: If they're sharing the same material/shader and texture
    then they'll batch easily.
     
    Last edited: Jul 17, 2018
  3. BinaryCats

    BinaryCats

    Joined:
    Feb 8, 2016
    Posts:
    317
    Yes
    Yes they are using the same material and are not using any texture

    These objects where created by navigating the ui create>3d object > cube
    Yet they are not batched
     
  4. BinaryCats

    BinaryCats

    Joined:
    Feb 8, 2016
    Posts:
    317
    There is apparently a Dynamic Batching tick box in the playersettings which the documentation did not mention o_O
     
    ElasticSea and BrandyStarbrite like this.