2D Draw a texture/sprite on specific position

Hi all,

I want to make a simple 2D game and all I need is to simply draw some images on screen at some specific coords (x and y). I already made my ‘load level’ function which is reading all my objects position from a XML file.

Now I need something like: DrawTexture (texName, posX, posY). Is there a tutorial for this?

Thank you

To draw something on the screen, you use the OnGUI method. In C#, it would be void OnGUI and in JavaScript it would be function OnGUI. Inside the method, you would use GUI.DrawTexture(Rect r, Texture2D t);