- Home /
Question by
goo-muffin · Apr 01, 2013 at 06:23 PM ·
guitextureimageclip
GUI.DrawTextureWithTexCoords question
Hi!
Can somebody please explain me how to use the rect for the GUI.DrawTextureWithTexCoords function?
I had this mini program:
public var rect :Rect;
public void OnGUI(){
GUI.DrawTextureWithTexCoords(Rect(20,20,rect.width,rect.height), TX, rect);
}
Why does this not work? It shows nothing of my image
Comment
Answer by Loius · Apr 01, 2013 at 07:12 PM
Argument one is screen position to draw into.
texCoords (argument 3) is a 0 to 1 range of what part of the image to draw.