Hi there and Happy Holidays. I got some glorious free time this Christmas break to finalize a couple of improvements I’ve been working on for Tiled2Unity.
As always, you can find the latest version of Tiled2Unity here.
Tile Animation Performance
I’ve long been embarrassed at how I had originally supported tile animations from Tiled Map Editor. It was a hack that manipulated vertex data at runtime which was a) slow and b) caused garbage collection spikes as vertex and index buffers were be allocated on the fly. Tiled2Unity now controls animation through enabling and disabling
MeshRenderer instances. It’s cheap and simple.
Note: You can find this example (and others) on GitHub to see how I use Tiled2Unity. All examples have been upgraded to the latest version of Tile2Unity.
Tile Objects Now Supported
Sometimes you want a single tile placed in your map without the hassle of having it as part of a Tile Layer. These Tile Objects were being exported as a simple transform (no visual tile) with earlier versions of Tiled2Unity. Now they are fully supported.
This was a significant change to Tiled2Unity compared to earlier updates. Here are some things to be aware of:
- Unity 4.x support has been removed. Sorry, but supporting older versions of Unity has become unwieldy. For what it’s worth, Sony and Microsoft (and I suspect Nintendo too) are phasing out support for Unity 4.x as well.
GameObjectheirarchy has been changed. In order to better support animations and object rotation and scaling I have changed how Tiled2Unity prefabs are constructed. You may have some scripts that were taking for granted a particular parent-child relationship that will need to be updated. (I recommend using tags to avoid issues like this in the future, not just when using Tiled2Unity, but as a general rule.)