Texture2D.GenerateAtlas returns true with a list of returned rectangles with a size of 0 when it should return false or return true and downscale the sizes provided in the parameters to fit the atlas size
Unity: Texture
Won't Fix
2023.3.X
2023.2.X
2023.1.X
2022.3.X
2022.2.X
2022.1.X
2021.3.X
2020.3.X
2022.1 has reached end of life so the issue will be fixed in a newer version.
Reproduction steps:
Open the attached project “GenerateAtlas-unity.zip”
Open the “/Assets/Scenes/SampleScene.unity” Scene
Enter the Play Mode
Observe the Console window
Expected result: Texture2D.GenerateAtlas returns false, thus no outputs with “[GenerateAtlas]” are present or the sizes of the rectangles are not equal to 0, but downscaled to fit the atlas size
Actual result: Texture2D.GenerateAtlas returns true, but all of the Rects in the result List<Rect> are returned with a size of 0