Search Unity

Having a big number of atlases in a 2d mobile game

Discussion in '2D' started by schwertfisch, May 21, 2018.

  1. schwertfisch

    schwertfisch

    Joined:
    Sep 7, 2010
    Posts:
    126
    I've decided to make an interactive fairytale for children.

    I'll be depending a lot on my narration and on images (characters, sceneries) that I will create. The controls will be minimal and as simple as they get.

    The number of atlases that Unity will create will be big. This of course will increase the app's size and I don't mind that. My question is if this will pose a burden to the devices' hardware. Will the device only load the graphics used at any given moment or will the big number of atlases make everything heavier for the hardware regardless of what is only being shown?

    (I hope I expressed my inquiry in a comprehensive way)
     
  2. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    Wooah, this is a semi tough one to answer. And alot can be said here.
    The other thing is, I have no idea, what type of enviroments, characters
    and objects, will be in this game. And what game objects, can be interacted
    with etc. I'll need more info.

    My suggestion would be, to use texture atlases, for large enviroments
    and landscapes. Use them a good bit and use them where you think, it
    would be important and necessary to use them.

    Check out this cool article. :)
    http://www.paladinstudios.com/2012/07/30/4-ways-to-increase-performance-of-your-unity-game/
     
    Last edited: May 22, 2018
  3. schwertfisch

    schwertfisch

    Joined:
    Sep 7, 2010
    Posts:
    126
    Thank you and apologies for being so late!
     
  4. Fatcat-Games

    Fatcat-Games

    Joined:
    Nov 9, 2016
    Posts:
    34
    Your texture atlases will be loaded into memory on a scene by scene basis. During loading screens you should call Resources.UnloadUnusedAssets() and System.GC.Collect() to cleanup the previous scene.
     
  5. schwertfisch

    schwertfisch

    Joined:
    Sep 7, 2010
    Posts:
    126
    Very useful, thank you
     
  6. Fatcat-Games

    Fatcat-Games

    Joined:
    Nov 9, 2016
    Posts:
    34
    I feel the need to elaborate on what I said above. It is an overly simplified version of what I believe is happening.

    From my understanding, texture atlases, sounds and other assets are loaded into memory, if they are referenced within the scene you are loading.

    So if you have a texture atlas for your UI, and you are using any image on that atlas in your scene, then the entire atlas will be loaded into memory.
     
    Last edited: Feb 10, 2019
  7. schwertfisch

    schwertfisch

    Joined:
    Sep 7, 2010
    Posts:
    126
    yes that's what I thought too, I did not know that I could unload the unused assets though
     
  8. sonali_31

    sonali_31

    Joined:
    Feb 11, 2019
    Posts:
    3
    This discussion really helped ..!!