- Home /
Question by
Necronomicron · Oct 19, 2015 at 11:47 PM ·
spriteimagesize
How can I get Image size?
I have Image object, it's stretched to screen, but it also has preserved aspect, so in my case sprite height doesn't equal to screen height. I can't find suitable property, does it exist at all?
Comment
maybe you have to take scale in consideration. Try something like this:
ScaledHeight = sprite.height * sprite.transform.localScale.y;
I did like that, just thought there is something built-in...