Search Unity

Sprite Atlas issue

Discussion in 'Editor & General Support' started by Igorexa, Mar 16, 2019.

  1. Igorexa

    Igorexa

    Joined:
    Sep 25, 2014
    Posts:
    23
    I have big texture (2560x1440) for background. I want to pack it in 2048x2048 atlas.

    Скриншот 2019-03-16 21.37.50.png

    I made 2 sprites (left part of texture - 2040x1440 and right part - 520x1440). Create a sprite atlas and place this sprites in it. 'Allow rotation' is checked. Then press 'Pack preview'.

    Скриншот 2019-03-16 21.38.03.png Скриншот 2019-03-16 21.38.21.png

    I get atlas with 2 pages, but first page has a lot of free space (second sprite can be places in it with rotation 90 degree). It look like a bug.

    How i can place it in single texture without external tools?


    I use Unity 2018.3.6 and MacOS Mojave.
     
  2. digipaul

    digipaul

    Joined:
    Nov 24, 2018
    Posts:
    43
    I think I can solve your Tetris puzzle. you need to split your main image into two parts, 2048x1440 and 512x1440. Then it should fit into your 2048x2048 first texture. One thing to bear in mind with sprite sheets is that unity likes to use power of two textures, so with your example here there is always going to be some leftover space..