talecrafter / AnimationImporter

Aseprite Animation Importer for Unity
613 stars 72 forks source link

Pivot point settings only applied to new animation files (UI/UX confusion?) #25

Closed idleMath closed 6 years ago

idleMath commented 7 years ago

Changing the config setting for the pivot point only seems to work if you are importing a new file.

Looking at previously closed Issues, I have the feeling that this may be by design? I understand that remembering previous settings is very useful when re-importing the same file, in which case, feel free to ignore this issue, but because I was trying to update the pivot point for a file that I had previously imported, I found it confusing.

A way to perhaps avoid this issue might be to adjust the UI slightly? It could be clearer what settings will actually be used during the import by having a way to select the file, load previous settings so that they can be modified (or not) and then a separate "Import Anim" button that actually does the importing. (See quick and dirty mockup attached). animationimporter_ui_suggestion

For clarity on what the issue/UI confusion actually is, here are Repro steps:

  1. In the Config section of the Animation Importer window, set Sprite Alignment to something, say "Center" (but it could be any of the settings)
  2. Import a new Aseprite file, anim_01.ase (just for the purpose of this example) by dragging it
  3. Now find the Sprite sheet that was created (anim_01.png) and open it up in Unity's Sprite Editor to see the slices and pivot points. And the pivots are correctly placed in the center.
  4. Go back to the Animation Importer window, change the Sprite Alignment to something else, say "Top Right" (anything BUT Center)
  5. Re-Import the SAME Aseprite file, anim_01.ase by dragging it
  6. Find the Sprite sheet that was created (anim_01.png) and open it up in Unity's Sprite Editor. The pivot points are still in the center. They haven't been updated to be in the Top Right of the sprites.

I hope this all makes sense. Please let me know if it doesn't and I will do my best to clarify!

talecrafter commented 6 years ago

Thank you very much for that clear description. And yes, this behavior is by design as I had in my personal project a lot of animations that used the same setting (characters) but a few others (effects, UI), that needed different pivot points, so it made sense to leave that kind of info with the imported files. The best solution I think would be to set import settings including overrides at the source files. But I don't have time to implement that right now. Your suggested UI solution could work, but it adds an additional step to most interactions. For now I just added info about a workaround to the readme, which is deleting the sprites and then reimport. (Shouldn't influence the project much as I assume it's the animations and animation controller that get referenced elsewhere in the project and not the sprites.)