Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to Optimize my Android Trivia Game?

Discussion in '2D' started by GluedBrain, Jun 24, 2015.

  1. GluedBrain

    GluedBrain

    Joined:
    Apr 12, 2013
    Posts:
    47
    I'm building an Android picture puzzle game which will have like 100+ pictures / sprites. Now, if I add these in the scene all at once to show up in the menu, the draw calls are like 100+. And as a result my game, especially the animations are kind of lagging on my nexus 5. I'm using Unity 5.1.1, i'm not sure if this is because of the bugs in unity 5 or the number of sprites on show.

    It would be great if you guys could help me out on this!

    EDIT: The animations are very basic menu animations like sliding keyboard, panels etc
     
    Last edited: Jun 24, 2015
  2. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    Try using a sprite packer tag.
     
  3. GluedBrain

    GluedBrain

    Joined:
    Apr 12, 2013
    Posts:
    47
    @blizzy I did. It didn't help much as all the sprites size is 512*512. It would fit 4 sprites in 1 atlas. However, the draw calls didnt change
     
  4. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    The draw calls should have gone down at least a bit, if you use the same material for each of your sprites.
     
  5. GluedBrain

    GluedBrain

    Joined:
    Apr 12, 2013
    Posts:
    47
    I don't have any material for the sprites
     
  6. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    Then you are probably using the default material.
     
  7. GluedBrain

    GluedBrain

    Joined:
    Apr 12, 2013
    Posts:
    47
    i have set it to none
     
  8. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    That works? Try using "Sprite-Default" and see if that makes a difference. Your sprites might look different because of the shader.
     
  9. GluedBrain

    GluedBrain

    Joined:
    Apr 12, 2013
    Posts:
    47
    I'll give it a try. Tell me something, does 100 draw calls make your game lag though?