Cammin / LDtkToUnity

Unity importer for the LDtk level editor
https://cammin.github.io/LDtkToUnity
MIT License
388 stars 39 forks source link

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

Closed stickynoteme closed 1 year ago

stickynoteme commented 3 years ago

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.

Cammin commented 3 years ago

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 commented 3 years ago

figure out what might happen if we try using LDtk's aseprite integration and if it's usable in some capacity

stickynoteme commented 3 years ago

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

Cammin commented 3 years ago

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 commented 2 years ago

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 👍

dcheglakov commented 2 years ago

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

dooderino commented 2 years ago

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

Cammin commented 2 years ago

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 commented 1 year ago

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 commented 1 year ago

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