Search Unity

Is Addressables recommended to this use case?

Discussion in 'Addressables' started by pistoleta, Sep 29, 2020.

  1. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    We have a city building tycoon and right now we are on the border of recommended RAM usage. Our game has a big collection of buildings with different meshes and textures and they are loaded all on start.

    Our interest on the Addressables is the possibility to load / unload assets from memory during runtime, so the player would not need to have in memory building sprites if he's not in the Shop menu or he would not need certain Building meshes if he didnt build them in the current map.

    Do you think Addressables is our way to go?

    Thanks a lot.
    pistoleta
     
  2. florinel2102

    florinel2102

    Joined:
    May 21, 2019
    Posts:
    76
    Hello , for me personally it's not very clear your problem , but I think addresable is a good way when it's about RAM optimisation - but from my experience I advice you to get ready for this system because at least for me working with addressables is like "working with c++" - manual memory management - can cause a lot of troubles
     
  3. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    The problem is all the sprites meshes and materials of the game are being loaded on start. So with an empty map we already are using 1.3 GB RAM which is not acceptable. Our intention was take in and out from memory groups of objects we are not using in a certain moment.
    For example if the player enters the shop UI, he needs all the building sprites, but he doesn't need the meshes and materials, and if the player goes back to the 3d map, he doesn't need 99 % of the sprites, since most of them belong to hidden menus in the UI.

    I appreciate any comment or hint.
    Thanks!
     
  4. florinel2102

    florinel2102

    Joined:
    May 21, 2019
    Posts:
    76
    Hello , yeah I understand your concern and using less RAM will make game more 'playable' for basic users and my opinion is that using addresables is one of the best way - but it's important how you manage addresables because let's say (it's just an example) if a player has 1.5/2 GB RAM and in the 3d map game use 0.5 GB Ram and when he enter the shop ui - all sprites are loaded once from 0.5 GB Ram -> 1 / 1.5 GB Ram probably game will crash or it will be very slow for a while for most mid range phone (loading a lot of sprites use CPU) . So it's important to understand how to manage .
    - a good example (even it's about multiple scenes it will help you to understand principle 'no load what player can't see' ) .