Seanba / Tiled2Unity

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

Animations won't play on objects on Object Layers #180

Open Spillutvikler opened 5 years ago

Spillutvikler commented 5 years ago

Hello! While working on my map in Unity, I've noticed that some of my objects have the animations I assigned and some don't. I managed to narrow it down to the Object Layers.

For example, I have a campfire that has a 4 frame animation and I placed it on the map in Tiled in an Object Layer. However, when I've imported the map with Tiled2Unity the animation seems to not play at all.

From what I've gathered the animation does indeed play, except that each frame is the same as the starting frame. So what I end up with is a 4 frame animation of a campfire except that the first frame of animation plays on all 4 of them, making it look like the animation isn't playing at all.

I've tried reimporting the map and a second map with different tiles and animation. I still have the same problem. I've also tried making a new project from scratch to see if any of the import files were corrupt and that didn't work either.

Is there a way to solve this? Love the software by the way, I've used it for years.

Seanba commented 5 years ago

Hi there. Can you send me your exported [your-map-name].tiled2unity.xml file? It sounds like you found a bug.

Spillutvikler commented 5 years ago

Of course. Here's a Drive link: https://goo.gl/wXFTvM

Seanba commented 5 years ago

Thanks, Dalmin, I have confirmed that all animation frames were, for some reason, exported as the exact same frame. Do you mind sending me your Tiled files (TMX, TSX, texture)? Thanks.

Spillutvikler commented 5 years ago

Of course! I don't have any TSX files though since I checked the "Embed in map" checkmark. Here's a Drive link to a ZIP file containing the TMX file and the tilesets: https://goo.gl/3CC9VU

Edit: Oh, and if it helps: I'm using Tiled v1.1.5, and Tiled2Unity 1.0.13.2

Seanba commented 5 years ago

Hi Dalmin, sorry for the late reply. I've starting looking into this and hope to have some news on it although it may take a couple of days (sorry, super busy at work). I suspect the problem may be that your animated cameras have different frame timings and that is confusing the animator. I hope to know more soon.