I’ve split an image, using grid by cell size. I used size 128x128.
For the sprite sheet I’ve put Pixels per unit to 128 and it works well to paint using the Tile Palette, in which I’ve dragged and dropped the sliced sprite sheet.
The weird thing is, usually when I click one of the sliced sprites, they show up in the Inspector with size in pixels, and these sprites are shown having size 113x113.
The reason why the sliced sprites are appearing as 113x113 pixels in the inspector even though you’ve sliced them at 128x128 pixels is because of the way Unity calculates the size of sprites.
When you set the Pixels per unit to 128, Unity assumes that each unit in your game world is equivalent to 128 pixels in your sprite sheet. This means that if you slice your sprite sheet into 128x128 pixel cells, each cell will be treated as a single unit in Unity.
However, when you click on a sliced sprite in the inspector, Unity displays its size in pixels based on the dimensions of the sprite itself, not based on the size of the original image or the number of units in your game world.
In other words, the sliced sprites in the inspector are being displayed as 113x113 pixels because that is the actual size of each sliced sprite in your sprite sheet, after taking into account any empty space around the edges of the image.
This can happen if your original image wasn’t perfectly aligned with the grid, or if there was any transparent padding around the edges of each cell.
So, the important thing to remember is that the size of your sliced sprites in the inspector is based on their actual dimensions, not on the size of the original image or the number of units in your game world.