2D Toolkit Forum

2D Toolkit => Support => Topic started by: cjddmut on May 26, 2013, 10:09:41 am

Title: Object layers in TMX files?
Post by: cjddmut on May 26, 2013, 10:09:41 am
I have a game that I'm recreating with Unity and 2D Toolkit. When I originally created this game I made all the levels using Tiled. I was very excited to see that 2D Toolkit played well with tmx files, this would save me quite a bit of time! However, I can't seem to find if 2D Toolkit supports object layers from the tmx file? My levels used a few objects that were defined in Tiled and I was hoping to avoid redefining all of them in Unity.

Any tips?

Thanks!
C.J.
Title: Re: Object layers in TMX files?
Post by: unikronsoftware on May 26, 2013, 11:12:09 am
It supports object layers. Just import as normal and then you can show/hide layers.
There isn't a code interface to do it in code, but its still possible - you can get the layer game object by doing:
tileMap.Layer