Closed IgorAherne closed 11 months ago
The third argument pivot determines what becomes the center of the Sprite. This is a Vector2 relative to the rect where Vector2(0.0f, 0.0f) is the bottom left and Vector2(1.0f, 1.0f) is the top right.
Oops.. I'm currently setting it to width/2f & height/2f. Turns out it should just be 0.5f, 0.5f 😇. Will resolve with next update.
Resolved in V1.0.0
Hello, the following does get the sprite, but its pivot is incorrect (sometimes Vector2(19291,10188), other times another amount). And the spriteRenderer will draw it several thousand units away.
If I then pause the gameplay and manually check the sprite that's in the SpriteRenderer (via unity Inspector), the pivot is reasonable (for example, 82,82) etc.
This means sprite's values are incorrect during the callback. They are only correct if I read them inside a next
Update( )
.Thank you