First, I have already searched many questions and answers. But none of them answer my question. So I create this new one.
I have a sprite sheet file created by TexturePacker. The sprite sheet contains a image as below, you can see, it displays as 31x40 pixels in the Unity editor. But the original image is 64x64 pixels (the bottom one).
When I try to access the position of game object which is created by the sprite. The strange thing happens, its position (tranform.position, I create a small purple circle there) is not located on the actual centre of the sprite, but on a bigger rect’s centre position. The game object’s rect seems to be 64x64, not 31x40.
So, how can I get the actual width/height(64x64) of the game object, instead of the displayed width/height(31x40)?
BTW, can I move the centre position to the correct one?
Or, can I change the game object’s size to correct one(31x40)?