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. Dismiss Notice

Game poorly optimized for android

Discussion in 'General Graphics' started by LetsStartSomeSeriousCoding, Jan 4, 2019.

  1. LetsStartSomeSeriousCoding

    LetsStartSomeSeriousCoding

    Joined:
    Apr 2, 2017
    Posts:
    33
    Hi, I'm making a really simple android game, with a map made in Blender with so less triangles you can count them. On PC it works fine (160+ fps) but on android it floats around 15/20, wich is terrible, considering how simple that game is. I ran the Profiler and most of the time is caused by rendering. At first I tought it was a vsync problem, but it wasn't. Then I tought it was a shader problem, because all of my materials were set to "Standard", so I changed it to "Mobile/Diffuse", leaving it white. But it still didn't do any difference.
    Here is a screenshot fo the profiler: https://imgur.com/a/bSAnmEu
    So in this game I have: a boat wich moves around and shoots projectiles, those projectiles get destroyed when they hit a collider (using Raycasts). Then I have another boat wich is an enemy.
    Here is another screenshot of the "very mmersive gameplay: https://imgur.com/a/nvoU4ko , to make you know how it looks like
    I'm pretty desperate, actually.
     
  2. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520
    How many batches does it render per frame? You'll probably need to decrease that. Another common issue on mobile is overdraw, but from the screenshot that is not the first thing I'd consider.
     
  3. ptgodz

    ptgodz

    Joined:
    Aug 4, 2016
    Posts:
    106
    Is your environment set to static? I've noticed that setting items to static as well as using dynamic batching in my player settings helped quite a lot for me
     
  4. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,887
    It should tell you right there. Click on CPU Usage and look at your rendering and scripts.
     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,134
    What's the mobile device you're testing the game on?
     
  6. arnaud-carre

    arnaud-carre

    Unity Technologies

    Joined:
    Jun 23, 2016
    Posts:
    97
    Hi! Could you post a screenshot of profiler in timeline view? ( timeline is really usefull to catch any abnormal CPU usage)