LDtkToUnity icon indicating copy to clipboard operation
LDtkToUnity copied to clipboard

LDtk added support for aseprite but LDtk to Unity can't handle them

Open stickynoteme opened this issue 4 years ago • 8 comments

LDtk added support for using aseprite files in it's last update, but any time I use one LDtk to Unity fails to import the project with a null error.

stickynoteme avatar Jun 11 '21 15:06 stickynoteme

I have not actually experimented with this yet, but I appreciate bringing this to light. It's a task I already have on the Trello, so I'll bump this up to a high priority.

As for importing aseprite files themselves, I may have to write a standalone aseprite asset importer, or use an aseprite Unity importer that already exists.

But I'll let you know when this feature is added 🙂

Cammin avatar Jun 11 '21 17:06 Cammin

The Aseprite to Unity importer is pretty good. I use it a lot for animations.

Link to the one I use in case you want it: https://github.com/martinhodler/unity-aseprite-importer

stickynoteme avatar Jun 11 '21 17:06 stickynoteme

I pushed a new update (2.0.5) which adds a safeguard when trying to load Aseprite files instead of where a texture file would normally be loaded so that the LDtk project is still imported safely.

However, I'm going to be leaving this feature unsupported at least for now until I get around to prioritizing this addition, and when I can find the cleanest solution possible. I want to avoid depending on external packages as much as possible unless I must.
image

So for now, exporting Aseprite files to PNGs is the way to go. Hopefully, it's not a huge problem 😅

Cammin avatar Jun 13 '21 22:06 Cammin

The unity aseprite importer by martinhodler uses a license (GPL-3.0) that is quite restrictive for what I'd want to do with it. So I was instead looking around to find an aseprite importer, and found a decent one with an MIT license, and it actually looks really clean, and is also compatible for aseprite 1.3 (I think): https://github.com/negi0109/unity-aseprite-importer

I'm planning on making a custom implementation based off the code from that repo to properly load aseprite files, just like how LDtk loads their aseprite files.

It's certainly going to happen, but not next update, as I'm currently working on adding new features to match with LDtk's 1.0 update 👍

Cammin avatar Feb 18 '22 21:02 Cammin

@Cammin thank you. We're looking forward to this feature. We hope it won't take long.

dcheglakov avatar Feb 22 '22 10:02 dcheglakov

+1, love your tool and this is the feature I'd love to have most.

dooderino avatar May 31 '22 18:05 dooderino

Yep, I keep on thinking about adding this soon. :) Currently just focusing on more integral features like performance, but aseprite file support should be coming soon enough 🙂

Cammin avatar May 31 '22 21:05 Cammin

An update on this: Unity has its own official Aseprite importer. It is however in a prerelease state. But, I think this will be the right way to go forward with supporting aseprite files with the importer in the future. It's still a low priority relative to some other things I'm working on, but unity's own aseprite package should be gaining some updates in the meantime to become stable for my own use. Once it's out of a prerelease state, that will be a good time for me to try using that importer to generate textures from 🙂

I've also heard that the aseprite support in ldtk appears to have minor issues based on some mentions I've seen previously. Exporting to a png is still the tried and true process, but there are certainly some workflow benefits from directly loading aseprite files 🙂

Cammin avatar Apr 04 '23 01:04 Cammin

The newest update (4.1.0) adds Aseprite support! Just install Unity's Aseprite importer, and LDtk will be able to load them 🙂 (The Aseprite importer requires Unity 2021.3.15)

Also added some docs about it here

Cammin avatar Oct 23 '23 09:10 Cammin