Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Single Sprite vs SpriteAtlas

Discussion in '2D' started by MardukCorp, Nov 3, 2020.

  1. MardukCorp

    MardukCorp

    Joined:
    May 21, 2016
    Posts:
    90
    I'm having multiple Adressables with around 5 .png files that are rather large (1080x1080px), and I'm using these always separately in my scene. This means that they're never on the screen at the same time.

    Now I'm wondering if it is better to simply keep these files separate of each other, or slight scale them and eg. fit 4 of them into a SpriteAtlas for better(?) performance or other advantages.
     
  2. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    505
    Hi @MardukCorp,

    The decision of having them separated or integrated on an atlas with a smaller resolution depends on multiple factors.

    Some of them are:
    • How much memory your game is using on the targeted lower-end device
    • How much quality is lost while making your images smaller
    • How frequent are the images used/swapped
    • How fast you would like to have the respective images switched
    Depends on the answers to these considerations you can make the right decision.


    Good luck with it!
     
  3. MardukCorp

    MardukCorp

    Joined:
    May 21, 2016
    Posts:
    90
    Hi @DiegoDePalacio, thank you for the details!

    The most important things are that the images would be swapped quite frequently and switching them should happen as quickly as possible.
     
  4. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    505
    Ok, in that case, it's probably better to use a SpriteAtlas if the visual quality is good enough ;)
     
unityunity