That may be quite simple to solve, but it’s giving me a hard time.
Actually I have a full character composed of many GameObjects, each one with a single sprite (Arm, Head, Rip and so on…).
I have made some updates in each sprites and would like to update the older ones. But, the problem is that after I change the sprite, in the Sprite Renderer, the sprite changes it’s size and my animation gets all messed up.
Any ideas of how could I change the sprites and keep the actual size?
Yes, the gameObject changes it’s current size, but the 2 images has the same resolution (59x100 pixels).
The only difference is that, when I created the game object and set the sprite image to it, for the first time, I made a resize in it’s scale for it to fit my background proportions.
May this be the source of problem? is there a way to keep this scale reference for the new sprite?
puzzle.Sprite = Sprite.Create(t, new Rect(0, 0, t.width, t.height),Vector2.one/2,256);
last int is for the pixelperUnity, its the cause of changing size.
Its fixed in my project,
my default pixelPerUnit=256 and unity default = 100 so its bigger 2.56 times
tell me if it helps