texture | Texture from which to obtain the sprite graphic. |
rect | Rectangular section of the texture to use for the sprite. |
pivot | Sprite's pivot point relative to its graphic rectangle. |
pixelsToUnits | Scaling to map pixels in the image to world space units. |
Create a new Sprite object.