- Home /
Question by
suyujin · Oct 19, 2011 at 12:27 AM ·
2dtexturescaleinteractive
Interactively Scaling a 2D Texture
So I essentially am looking to scale the 2d image I'm using for my crosshair in a fps.
if(Input.GetKeyDown("e")){ crosshair.width += 5; crosshair.height += 5; }
that's pretty much it, I just want to push a button to enlarge my texture. Though that code doesn't seem to do anything at all.
Comment
Answer by suyujin · Oct 19, 2011 at 11:51 PM
So I figured it out. In the GUI.DrawTexture there is a ScaleMode option. ScaleMode.ScaleToFit is what I needed.
Your answer
Follow this Question
Related Questions
3dmax model to unity scale? 0 Answers
How expensive is scaling in 2D unity? Is it better to pre-scale? 1 Answer
How do I scale a 2D sprite over time? 2 Answers
Making 2D water? 1 Answer