- Home /
Question by
trvr · Aug 14, 2014 at 06:35 AM ·
2dguitextureguitexture
Eliminate GUITexture Excess?
Hello! Today I need help cropping my GUITexture so that it nicely fits the bar (See Picture). Any ideas? Thanks in advance!
Comment
Answer by mediumal · Aug 14, 2014 at 08:21 AM
Try using Graphics.DrawTexture(), which allows you to specify a material to draw the texture on, combined with a material that uses a mask shader. You will need to change both the screenRect and sourceRect parameters as the meter depletes.
Your answer
![](https://koobas.hobune.stream/wayback/20220613160557im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity 2d mobile android GUI texture button 1 Answer
Best way to show an image 2 Answers
Health system 2d 2 Answers
Get GUITexture to follow ScreenPointToRay ray cast 1 Answer
Toggle GUITexture V.2 1 Answer