martinhodler / unity-aseprite-importer

An aseprite-file importer for unity written in C#, built upon the experimental AssetImporter API
GNU General Public License v3.0
323 stars 49 forks source link

Edit Sprite metadata #9

Open B-Reif opened 5 years ago

B-Reif commented 5 years ago

Problem When generating sprites from the importer, I don't see any way to manipulate the pivot of the generated sprites.

Solution I'd like to be able to edit sprite pivots the same way that unity enables for other image imports. Even if it's not possible to do visually it could at least be exposed as a Vector2 field.

Alternatives Since the generated sprites and animations are read-only, I'm not sure if any alternative exists. (Maybe I could hack the meta file myself?)

Additional context This is the sprite editor I'm referring to. It'd also be helpful to expose the other fields here also. I do occasionally use sprite borders or rename sprites, for instance.

Screen Shot 2019-05-08 at 3 05 59 PM

By the way, I love this importer. Thanks for your work on it.

martinhodler commented 5 years ago

The importer has a pivot field, but this will set the same pivot to all the sprites. You would like to edit the pivot for every single frame?

B-Reif commented 5 years ago

Ideally yes, or at least on a per-animation basis. I can work around this enlarging the canvas in Aseprite. That results in the textures being a bit larger than necessary, though.

I'm more concerned with generally editing the emitted assets. For example, it's impossible to add animation events or set sprite borders. I wonder if we can additively apply metadata to the assets without letting the user mess with the actual aseprite-defined values like animation timings or art.

martinhodler commented 4 years ago

I'm currently working on this issue. A preview of this can be found on the sprite-importer branch: https://github.com/martinhodler/unity-aseprite-importer/tree/sprite-editor

filod commented 4 years ago

I've tried sprite-editor branch, it's relatively slow & buggy(crush sometimes), but also it's quite an amazing feature that i like, thx!