Need to use the Tiled Map editor with the Unity 4.3.4

Hey Guys ,

I shifted to unity few weeks ago. I am developing a 2D platformer. For creating the maps I am using Tiled map editor from www.mapeditor.org . I have created a basic map. Included the tileSheet png and the .tmx file (saved as XML) in the Assets. I am able to read the XML , that is all the gid’s. But I don’t know how to access a particular portion(tile) from the tileSheet corresponding to a gid.

I think for this I need to load sprite in the memory and select a tile (by specifying Height and width and coords) from texture memory to display it on screen. As given here :Parsing and Rendering Tiled TMX Format Maps in Your Own Game Engine | Envato Tuts+
but its for flash , how I can achieve same thing in Unity using C#. Notice the copyPixel stuff in the flash code. I thought I could use ReadPixels but it is used for reading from screen only not the texture memory.

Thanks.

You can consider to use this: Chaoseiro / X-UniTMX / wiki / Home — Bitbucket

Eklavyaa, I recommend keeping all “source” art and production files outside of the Unity Assets folder. My preference would be to work with the Tiled Map Editor outside of Unity and then export your maps into Unity when you are done making changes to them – a similar approach that modelers and animators are recommended to take with their 3D art files.

That’s the approach I took with Tiled2Unity, which provides a pipeline for getting your Tiled map TMX files transformed into prefabs to be placed in your Unity scene. Give it a try and see if works for you. (It’s free, btw)

Best,
Seanba