Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Performance issue!

Discussion in 'Android' started by unity2, Jul 11, 2019.

  1. unity2

    unity2

    Joined:
    Jan 10, 2013
    Posts:
    23
    Hi,

    Below is the output of internal profiler of android. FPS is around 20.

    D/Unity (19072): cpu-player> min: 20.8 max: 183.9 avg: 41.5
    D/Unity (19072): cpu-ogles-drv> min: 0.0 max: 0.0 avg: 0.0
    D/Unity (19072): gpu> min: 0.0 max: 0.0 avg: 0.0
    D/Unity (19072): cpu-present> min: 0.6 max: 7.0 avg: 1.5
    D/Unity (19072): frametime> min: 21.6 max: 185.8 avg: 43.0
    D/Unity (19072): batches> min: 49 max: 65 avg: 58
    D/Unity (19072): draw calls> min: 53 max: 73 avg: 64
    D/Unity (19072): tris> min: 19265 max: 23003 avg: 21241
    D/Unity (19072): verts> min: 17097 max: 19195 avg: 18158
    D/Unity (19072): dynamic batching> batched draw calls: 17 batches: 11 tris: 73 verts: 133
    D/Unity (19072): static batching> batched draw calls: 0 batches: 0 tris: 0 verts: 0
    D/Unity (19072): player-detail> physx: 786.7 animation: 1392.5 culling 0.0 skinning: 347.0 batching: 0.9 render: 13273.9 fixed-update-count: 0 .. 5
    D/Unity (19072): managed-scripts> update: 6420.2 fixedUpdate: 67.1 coroutines: 0.0
    D/Unity (19072): managed-memory> used heap: 40456192 allocated heap: 61190144, max number of collections: 2 collection total duration: 308766.0

    How to know where the bottleneck is?
    Thanks in advance.
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    1,478
    Hi!
    Why don't you use Unity profiler?
     
  3. unity2

    unity2

    Joined:
    Jan 10, 2013
    Posts:
    23
    Because game hang when I run profiler with it.
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    1,478
    Well, the information in your first post is not enough to determine, where the bottleneck is. A proper profiler is usually required to firgure that out.
    Did it crash? Or just hang?
     
  5. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    57
    Your main problem is with your script update loop. You should probably look into optimizing your scripts.
     
  6. unity2

    unity2

    Joined:
    Jan 10, 2013
    Posts:
    23
    When I first started, Unity profiler works for 2-3 times but after that, game just hangs till death when Unit profiler shows device name in auto connect profiler.
     
  7. unity2

    unity2

    Joined:
    Jan 10, 2013
    Posts:
    23
    doesn't this time should be in ms? but then too it's a big value, according to this my game should not run a frame but it's running with 20 fps.
     
  8. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    57
    It is rendering at 20 fps. It does not mean that your game is actually running at 20 fps. If the update loop takes too long, some frames gets skipped/dropped.
     
unityunity