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

Game lagging inspite of low dra calls

Discussion in '2D' started by itachi4365, Apr 20, 2014.

  1. itachi4365

    itachi4365

    Joined:
    Sep 24, 2012
    Posts:
    40
    I am making a 2D game using the 2D project settings. I have just 25 draw calls, only 663 vertices Main Thread is just taking 13.3ms, here is a image. The game is lagging a lot on mobile. The mobile I have been testing is Samsung Galaxy Duos.
     

    Attached Files:

  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    13.3ms is kind of a lot, considering a desktop CPU is typically quite a bit more powerful than mobile. If you have Pro, use the profiler, otherwise look at your scripts and try to see where you can optimize them.

    --Eric
     
  3. Pyrian

    Pyrian

    Joined:
    Mar 27, 2014
    Posts:
    301
    Is it? I get 13-14ms with an unscripted camera and no enabled game objects.
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah it's not that reliable on that panel since it probably includes waiting for whatever. Try the profiler for a better indication. You'll need to be much more specific than "lagging" as that doesn't appear to be technically possible at 70+ fps.
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I would assume you have vsync on or something. With an empty scene and no frame limiting, I get 0.5ms.

    --Eric