Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

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:
    124
    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:
    1,054
    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:
    124
    Thank you and apologies for being so late!
     
  4. Fatcat-Games

    Fatcat-Games

    Joined:
    Nov 9, 2016
    Posts:
    15
    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:
    124
    Very useful, thank you
     
  6. Fatcat-Games

    Fatcat-Games

    Joined:
    Nov 9, 2016
    Posts:
    15
    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:
    124
    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:
    Monday
    Posts:
    2
    This discussion really helped ..!!