Okay… I’ll make this short sweet and to the point… The title says it all I’m trying to use GUI.DrawTexture in a function of my own…
in other words
function OnGUI(){
GUI.DrawTexture(Rect(0,0,10,10),thetexture);//this works
}
public function toodles(){
GUI.DrawTexture(Rect(0,10,10,10),Theothertexture);//this dosent
}
Adding to what Eric5h5 said, the following code would work:
function OnGUI(){
GUI.DrawTexture(Rect(0,0,10,10),thetexture);//this works
toodles(); //calling the toodles function from within OnGUI() will also work
}
public function toodles(){
GUI.DrawTexture(Rect(0,10,10,10),Theothertexture);//this dosent
}