Search Unity

How to reduce draw calls of simple rotating objects

Discussion in 'Getting Started' started by xjjon, Jun 2, 2020.

  1. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    613
    I have rotating objects in my game (used for item drops, coins, etc) and each of them only take 2 draw calls each but there can be 50-100 of these drops on the map before a player loots them.

    box.png

    As you can see from the screenshot it's just a simple model.

    How can I optimize these? For the rest of the map, the static objects are batched and that helped the performance a lot, but these are dynamically created when enemies are killed. They get culled if they aren't looted quickly but a player can still create like 50-100 if they kill enemies quickly.

    It's for a mobile game so 50-100 * 2 == 100-200 extra draw calls when they are on the screen

    They are 3d and rotate but don't move position
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    You can use DrawInstanced for things like this. That'll reduce it to 1 draw call for each unique drop type.
     
    xjjon likes this.