unity-aseprite-importer
unity-aseprite-importer copied to clipboard
Image embedded data
It would be nice I was able to embed data into the image itself, similar to how MetaSprite does it: https://github.com/WeAthFoLD/MetaSprite/wiki/Metadata
Specifically...
- [ ] Add a layer in aseprite with a special name (ie. #pivot) where you can draw the pivot point for each sprite.
- [ ] Add a layer in aseprite with a special name (ie. //whatever) where you can draw whatever without it getting imported.
- [ ] Add a special tag attribute to each tag to indicate a looping animation (ie. TagNameExample #loop)
MetaSprite has a few more, but for now, these would be great timesavers and painkillers.
Hey @ArkuniGIT could you elaborate what the other features are? Im currently working on implementing the first and last of your request. I had a private branch on this but need to fix some bugs.
Hey @ArkuniGIT could you elaborate what the other features are? Im currently working on implementing the first and last of your request. I had a private branch on this but need to fix some bugs.
You are the best! <3
I didn't really use the other features, so this is my interpretation of the documentation that I could see being very useful in other situtations.
- [ ] Ad a layer in aseprite with a special name (ie. #childName1.position) where you can draw the local position for each child element.
- [ ] Ad a layer in aseprite with a special name (ie. #boxCollider or #childName1.boxCollider) where you can draw the local position and size for box colliders.
- [ ] Add a layer in aseprite with a special name (ie. #event("FunctionName")) that will generate the a native animation event for every frame where there is at least one drawn pixel.
A little update:
Add a layer in aseprite with a special name (ie. #pivot) where you can draw the pivot point for each sprite.
I need this as well as even frames to reszie colliders and trigger events. For now I have a similar feature to Metasprite where you define the pivot point for the entire file in the first animation tag that follows the format "Pivot:x,y".
Add a layer in aseprite with a special name (ie. //whatever) where you can draw whatever without it getting imported.
I have this implemented in one of my branches. Stlll need to do further testing.
Add a special tag attribute to each tag to indicate a looping animation (ie. TagNameExample #loop) By default our asepriteimporter will set animation loop to true. My version markes "Play Once" by appending a "-" to the front but I like then # a bit more now I think about it. Anyways I put them as variables so you can customize these. (I will make these serializable so you dont ever have to go into the code)
Add a layer in aseprite with a special name (ie. #event("FunctionName")) that will generate the a native animation event for every frame where there is at least one drawn pixel.
This is on the way. Kind of spent most of my day working on something similar. The animations are no longer read-only in unity so you can directly edit the events in unity rather than going into aseprite. But being able to edit it in aseprite is is an option. But I am not sure which way is would be the better route in the long run.
I need this as well as even frames to reszie colliders and trigger events. For now I have a similar feature to Metasprite where you define the pivot point for the entire file in the first animation tag that follows the format "Pivot:x,y".
I think it will be quicker to change/view and less prone to errors if you are drawing the pivot, rather than writing it.
I have this implemented in one of my branches. Stlll need to do further testing.
Add a special tag attribute to each tag to indicate a looping animation (ie. TagNameExample #loop) By default our asepriteimporter will set animation loop to true. My version markes "Play Once" by appending a "-" to the front but I like then # a bit more now I think about it. Anyways I put them as variables so you can customize these. (I will make these serializable so you dont ever have to go into the code)
Great idea!
This is on the way. Kind of spent most of my day working on something similar. The animations are no longer read-only in unity so you can directly edit the events in unity rather than going into aseprite. But being able to edit it in aseprite is is an option. But I am not sure which way is would be the better route in the long run.
I think this varies from developer to developer, but I like the idea of not having to touch the asprite importer settings and being able to define it all in the file itself.
I think this varies from developer to developer, but I like the idea of not having to touch the asprite importer settings and being able to define it all in the file itself.
Sorry, not the importer itself. I meant using the unity curve editor where Animation Events are defined.
What if you change the animation? Like adding a couple of extra frames/seconds to the beginning of the animation, then upon reimport, your events will need to be readjusted. I think it is easier to control if defined alongside the animation in the aseprite file.
The events are index based so they likely will get shifted. But I am in love with the idea of creating a bounding box for the collider in aseprite rather than unity. Im really considering the long term and steering clear of anything "breaking" when there is a major unity update.
Could be resolved with https://github.com/martinhodler/unity-aseprite-importer/issues/36