I drew 2D textures on the screen by using GUI.DrawTexture and GUI.Button.
I would like to remove those texture from the screen.
How can i do that? which API should i use?
void OnGUI() { GUI.skin = myGUI;
// draw a background image of main menu screen
GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), mainMenuBG);
// make 3 buttons as a main menu
if (GUI.Button (new Rect (Screen.width / 2 - 128 / 2, Screen.height / 2 + 32, 128, 32), newGame, "NewGame"))
{
Debug.Log("Start New Game");
Application.LoadLevel(2); // Level2 : Stage1
}
} // end of OnGUI class