Seanba / Tiled2Unity

Export Tiled Map Editor (TMX) files into Unity
Other
495 stars 120 forks source link

Custom attributes from templates #155

Open jamiec7919 opened 6 years ago

jamiec7919 commented 6 years ago

Hi,

I'm not sure if this is by design or not but it appears that custom attributes set by a template are not being read/imported. For example (image below if it helps), I've created a template called EnemySpawn.tx which has a default attribute called enemy:type. This is not being imported into Unity, however if I manually add a custom property it works ok.

tiled

I see the following in the tmx file, which makes sense but I'm not sure if Tiled2Unity will read the .txs and I've just got it in the wrong place?

`

`

I'm trying to use these in a custom importer (using the HandleCustomProperties method) which works fine for manually added properties isn't being called for objects with only the template defaults.