Draw 2D textures on screen for a simple 2D game

Hi all,

I am quite new to Unity but I have some programming experience. I made 2 casual games (hidden objects) and I decided to move to Unity.

I need your advice with a few things. I am planning to make a Hidden Object game in Unity to learn the framework. I already made some random tutorials and I learned a little about the Editor.

I have now some specific questions:

  • What should I use to render my 2D sprites/textures? In the other languages in order to simply draw a texture on screen I called something like:

DrawImage (imageID, positionX, positionY)

but from what I found until now in Unity I see the coordinates system for 2D is quite different and I cannot figure it out.

I managed to load my level from an XML file but that’s all for now. I have no idea how should I draw my PNGs on screen at 200,300 pixels for example.
All my game design is made for 1280 x 768. My Hidden Objects scenes have 1 background image and 40-50 objects.

  • Second question would be how to manage the ‘click on object’ problem. After I will be able to render the objects on screen I would like to perform a… collision detection on these one to be sure if the players is clicking on a particular object.

Basically I would like to know if the pixel I clicked has the Alpha = 255 or not :smile:

Please, if you know some tips or have links to tutorial show them here.

Thanks,

Get a 2D system from the asset store, or wait for Unity 4.3.

–Eric

Hi Eric,

I saw the video about 4.3 and seems to be quite the update I need. Any idea when will be available?

What 2D system would you recommend me?

When it’s done. :wink:

–Eric