Unity Issue Tracker - The "Compress Tilemap Borders" function is not working when used via the Context Menu or through Script
Closed
UUM-71937
The "Compress Tilemap Borders" function is not working when used via the Context Menu or through Script
Unity: 2D
As Designed
6.0.X
2022.3.X
2021.3.X
The Rect tool shows the bounds of the Tilemap based on the Grid spaces used by Tiles. It does not show the bounds of what is rendered by the TilemapRenderer which are smaller than or equal to the Grid spaces used (smaller in this case).
How to reproduce:
1. Open the attached “IN-74639.zip” Project
2. Open the “SampleScene”
3. Expand the “Grid” Game Object in the Hierarchy and select the “Tilemap” Game Object
4. Press the Kebab Button of the “Tilemap” Component in the Inspector Window
5. Press the “Compress Tilemap Bounds” Button
6. Observe the Scene View
Expected result: The “Tilemap” GameObject is aligned or compressed with the “Grid” GameObject borders
Actual result: Nothing of note happens