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.

Question Game is too big, too slow

Discussion in 'Package Manager' started by islamagdy111, Oct 25, 2022.

  1. islamagdy111

    islamagdy111

    Joined:
    Oct 29, 2019
    Posts:
    18
    Hi.
    I've watched alot of android games with awesome graphics and art and lights and particle systems, and it is smooth and not too big in memory or space.. I've made 3 small 2d games and now trying to create 3d one. And all have the same problem ( too slow, too big)...
    I was searching all solutions on internet for years, in my 3d game I'm using URP and I did all these:
    - Optimized all textures to the point it looks ugly
    - removed all real-time and mixed lights and extchanged some with very cheap particles
    - baked some lights and optimized the lightmaps to the most
    - disabled all shadows and replaced it with fake shadows (a sprite with transparent blurred shadow texture), and also some fake lights to be dynamic
    - organized my project and removed everything i dont use Including packages
    - Optimized all sounds at the most as I know
    - disabled raycast target on every image and text
    - set all non moving object to static
    - removed all custom shaders
    - Obtimized my scripts as much as I know
    - enabled generate MipMap
    - the quality is set to medium (and tried low as well)
    - VSYNC is disabled

    And maybe I did more but that is all I can remember now...
    I tryed it on my samsung A52, it is smooth but on some other phones it lag alot.
    In space it is about 80mb and it's about 20% done in the game, I still have about 80% to finish it. At then it should be 5gb or somthing o_O

    It driving me crazy how people manage to make such great games with good size and without lagging..
    Question: is there sort of secrets or some info that couldn't be found on the internet???
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,446
    Adressables can help with memory

    Batching or combining meshes will help a LOT with performance, especially on mobile (Mesh Baker and MeshCombineStudio2 are great).

    Make sure as many models use the same material (maybe with texture atlassing)

    Use Unlit, Baker Lit, or simple lit when possible (in order of how heavy they are)

    Here are some of my performance starters:
     
  3. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    1,837
    Have you profiled the game?

    You can make all those changes that are recommended here and there but at the end of the day, you want to optimize only the (few) things that have the most impact on the target platform and leave the rest alone.
     
    DevDunk likes this.
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,446
    Make sure to profile with the android build and not on PC*
     
    CodeSmile likes this.
  5. islamagdy111

    islamagdy111

    Joined:
    Oct 29, 2019
    Posts:
    18
    sorry for late respond, I was trying all your suggestions. but I have problems with 3 things
    1- combine meshes: I followed some tutorials and I succeeded to combine meshes but there was no difference in memory or performance at all. !!!
    2- texture atlas: I tried to make 1 atlas for some textures as a test. it worked just fine in editor and game mode but on device all textures in this atlas disappeared with no errors. !!
    3- addressables: this one was completely new to me so I spend alot of hours to learn how to do it. at last I made a test on one scene and it worked fine. but then I made change to prefab then it didn't work anymore. I tryed everything even started all steps from the beginning and no luck. it says in unity console (RemoteProviderException : Unable to load asset bundle from : (Link)... ResponseCode : 404), I used Unity dashboard to upload assets.
     
  6. Tamaraortega

    Tamaraortega

    Joined:
    Nov 1, 2022
    Posts:
    1
    You can download mod apk games from heyhey.net website, very smooth for your android operating system
     
    Last edited: Nov 3, 2022
  7. islamagdy111

    islamagdy111

    Joined:
    Oct 29, 2019
    Posts:
    18
    about problem number 3 that I mentioned, at last I did it, it was nightmare for days.
    for those who have the same problem:
    the steps have to be in exact specific order...
    1- run setup guide in unity dashboard /LifeOps/Cloud Content Delivery, (upload any small file for now).
    2- go to your bucket and copy the url with the latest badge (Not the release one).
    3- put the url link in unity Addressables Profiles / RemoteLoadPath.
    4- build the addressables group.
    5- delete the small file (in number 1 of this steps), and upload the files from ServerData to your bucket.
    6- create new release.
    and you are done :)

    * if you promoted the release => start from number 4 again and follow the steps
    * if you made changes to groups => update the addressables group, then follow steps from number 5