I am trying to draw a texture to the screen using code, but keep getting the error below. Please help me.
Assets/01SkugPezz/WeaponSelection.js(20,16): BCE0023: No appropriate version of ‘UnityEngine.GUI.DrawTexture’ for the argument list ‘(UnityEngine.Rect, UnityEngine.GUITexture)’ was found.
var fireButton :GUITexture;
function OnGUI()
{
if(!fireButton)
{
Debug.LogError("Assign a Texture in the inspector.");
return;
}
GUI.DrawTexture( new Rect(0, 50, 50,50), fireButton);
}