Search Unity

Official 2D Animation is out of preview for 2019.3

Discussion in '2D' started by rustum, Jan 30, 2020.

Thread Status:
Not open for further replies.
  1. marcarasanz

    marcarasanz

    Joined:
    Aug 23, 2019
    Posts:
    20
    I have found what caused some of these to become deformed when spriteswap, like the example in the photo. For some reason, sprite skin changes the order of the list which causes the sprites to dislodge.It just happens with one sprite, the sprites and bones orders seems correct.. Is it a bug? or a malpractice of mine? is there any way to fix it?
     

    Attached Files:

    Last edited: Sep 14, 2020
  2. Veritas

    Veritas

    Joined:
    Mar 18, 2014
    Posts:
    14
    EDIT: This is a bug in Gimp 2.10.20. You need to restart Gimp and then immediately export the file to PSD. Can I just say again that's it's kinda insane to require "PSB" as the format for this?

    Trying to import a PSD has now started to crash my unity. Any ideas?

    Stacktrace:

    Code (CSharp):
    1. Asset import failed, "Assets/Art/Bosses/SecuritySystem/Tentacle.psb" > RleException: RLE packet overruns the decode window.
    2. PhotoshopFile.RleReader.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) (at Library/PackageCache/com.unity.2d.psdimporter@2.1.4/Editor/PSDPlugin/PsdFile/RleReader.cs:74)
    3. PhotoshopFile.Compression.RleImage.Read (System.Byte[] buffer) (at Library/PackageCache/com.unity.2d.psdimporter@2.1.4/Editor/PSDPlugin/PsdFile/Compression/RleImage.cs:47)
    4. PhotoshopFile.Channel.DecodeImageData () (at Library/PackageCache/com.unity.2d.psdimporter@2.1.4/Editor/PSDPlugin/PsdFile/Layers/Channel.cs:227)
    5. PhotoshopFile.PsdFile.DecompressImages () (at Library/PackageCache/com.unity.2d.psdimporter@2.1.4/Editor/PSDPlugin/PsdFile/PsdFile.cs:499)
    6. PhotoshopFile.PsdFile.Load (System.IO.Stream stream, PhotoshopFile.LoadContext loadContext, PhotoshopFile.ELoadFlag loadFlag) (at Library/PackageCache/com.unity.2d.psdimporter@2.1.4/Editor/PSDPlugin/PsdFile/PsdFile.cs:110)
    7. PhotoshopFile.PsdFile..ctor (System.IO.Stream stream, PhotoshopFile.LoadContext loadContext, PhotoshopFile.ELoadFlag loadFlag) (at Library/PackageCache/com.unity.2d.psdimporter@2.1.4/Editor/PSDPlugin/PsdFile/PsdFile.cs:84)
    8. PaintDotNet.Data.PhotoshopFileType.PsdLoad.Load (System.IO.Stream input) (at Library/PackageCache/com.unity.2d.psdimporter@2.1.4/Editor/PSDPlugin/PhotoShopFileType/PsdLoad.cs:40)
    9. UnityEditor.U2D.PSD.PSDImporter.OnImportAsset (UnityEditor.Experimental.AssetImporters.AssetImportContext ctx) (at Library/PackageCache/com.unity.2d.psdimporter@2.1.4/Editor/PSDImporter.cs:215)
     

    Attached Files:

    Last edited: Sep 18, 2020
  3. stickylab

    stickylab

    Joined:
    Mar 16, 2016
    Posts:
    92
    how to make detachable bone or limb please ?
     
  4. ScionOfDesign

    ScionOfDesign

    Joined:
    Oct 6, 2016
    Posts:
    82
    Would it be possible to make the Sprite Resolver also work for UI images? I find it useful but currently it only seems to work for regular SpriteRenderers.
     
  5. bearcoree

    bearcoree

    Joined:
    Mar 8, 2016
    Posts:
    72
    I'd much rather have a native implementation into the 2d animation package than compensation haha

    I'm sure the lovely unity coders can implement much better deformation tools than me. I was looking at the workflow in tools like spine, AfterEffects, Live2D and such and man... That would be a ton of work to replicate. But if unity had those capabilities, it'd be a total gamechanger for all kinds of 2d stuff! Unity devs pls ♥
     
    berdanka and EvOne like this.
  6. playemgames

    playemgames

    Joined:
    Apr 30, 2009
    Posts:
    438
    LOL keep praying, them just integrating your stuff shows how much of a priority it is for them. I had offered my work with Sprites and Bones to aid them years ago, but it went no where. At this point and with Unity's track record on native support of anything, it is better to use a 3rd party tool or roll your own to make sure you can just have things work as intended. Who knows, maybe this will be the kick in the pants they need to actually get it done but we will see.
     
  7. manutoarts

    manutoarts

    Joined:
    Nov 9, 2019
    Posts:
    3
    Hey there, Im having an issue while sharing a package of animated prefabs. Those have an animation made over a single rigged image, but in the destination project says "Sprite has no bind poses", does anyone know how to fix this?
    It says in this post https://forum.unity.com/threads/sprite-has-no-bind-poses.727472/ that changing versions of the Asset Pipeline to Version 1 could fix the problem but in 2020.1.6f1 version doesn't let you do that, any clue?
    Thank You
     

    Attached Files:

    Last edited: Sep 26, 2020
  8. basaragbi

    basaragbi

    Joined:
    Dec 2, 2014
    Posts:
    3
    Hi everyone,

    I have a question.

    Let say, I finished a complete set of assets(illustrated parts of my character) to animate my character. And then I finished a full set of animations for it. But after a while, I decide to make additions to my character, e feather set to make it fluffy or some additional gadgets to make it more scientific or anything you can imagine. And then I get back to my psb file and make an extra layer for the additions.

    Is it possible to do that?

    Or has someone figured out a solution for such a situation???

    Thx
     
    Xiangting_Su and EvOne like this.
  9. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    Hi!

    I'm working with your awesome feature Sprite Swap. :)
    I was wondering if this behavior is as intended?:

    1. I have an original sprite with bones
    2. I create another sprite (with same photoshop-image size, but the object has slightly different dimensions) with the same bones.
    3. I set up Sprite Swapping
    4. When the sprite swap occurs the second sprite (with slightly different painted dimensions) will appear offset in game
    (that is to say that it is not aligned as it is in the PBS-file or in the Sprite Editor).

    I tried moving the sprite's pivot-point in the Sprite Editor to see if it affected the offset, and it seems to affect it sometimes but not all.

    Does the sprite being swapped need to be identical in dimensions? And if not, do you know what the issue could be that would lead to an offset and how I could fix it? Thanks so much in advance! :)
     
    EvOne likes this.
  10. berdanka

    berdanka

    Joined:
    Sep 29, 2015
    Posts:
    24
    In case when you need to create new layers for your details, this should be possible as long as:
    Before you export PSB file:
    -you're planning out the structure of your character's model in scene. You're using groups and name your layers meaningfully (you won't be able to edit them later).​
    After you imported your PSB asset into the scene:
    - you left your PSB asset unpacked (leaving it as a prefab means the object you're animating in your scene will be updated every time you applying changes made to the PSB source externally)
    - you avoid changing its hierarchy and names of groups and layers;
    - you avoid animating or adding assets to any objects that might be moved/removed/renamed someday.​
    When you edit the PSB source:
    - you avoid breaking hierarchy of layers (animation relies on it, as well as some components)
    - you avoid deleting/merging any old layers in PSB to keep their ID's for PSB importer intact. If you need to merge some of your old layers with new, the new layer must be on top, so the final layer will get the ID of the old one (be extra careful here, this not necessary works in every editor)​
    At all times:
    -you make backups. Lots of them. Everywhere.
    But in my opinion, it's not worth the effort. In the case of small updates, it's easier to create corresponding objects in animated models manually. Also, leaving the PSB asset as an unpacked prefab is the same as working with a bomb, one wrong move and everything is lost.

    Though, if you just want to edit some layers without messing with PSB's structure, it's super easy and doesn't require any precautions. After applying your changes they will be correctly repeated in your model even if you resliced the sprite or unpacked the prefab.
     
    Last edited: Sep 30, 2020
    Xiangting_Su and EvOne like this.
  11. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    173
    Do you have a similar situation? #383

    well, it looks like nothing has improved since...
    2020-09-30_10-24-06.png

    P.S. "The promised - they wait for three years ..." - Russian proverb ...
    -just a little more to wait

    2020-09-30_10-32-53.png
     
    Last edited: Sep 30, 2020
  12. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    I see, it's good to know I'm not the only one that has encountered this bug!

    Did you try making an official-bug report for this EvOne? I did it once for a Sprite Swap issue and they were very fast in finding a workaround for me + adding a fix for the bug. Otherwise I can make one.

    Could be that this bug in particular is hard to fix perhaps?
     
    EvOne likes this.
  13. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    173
    But after all, I essentially had an official response from the developer... :)
    And in this response, he did not ask to send a report...

    In general, I do not see a "bug" in this - everything works exactly as it was programmed :)
    An imperfection - perhaps, but a bug - probably not.
    Another thing is that I do not know bugs (or shortcomings) that could not be eliminated in a year ...

    Recently, the feeling of "secondary importance" for the developers themselves, practically everything that is done in Unity in relation to 2D - does not leave me ...
     
  14. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    I think I'll attempt making a proper bug-report just in case!
    I've worked in tech some and by my own experience I know bugs/task can get lost in the chaos of development haha.
    I don't think they mean anything bad by it. I will update here if I get a reply from the bug-report! :)
     
    EvOne likes this.
  15. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    rustum and EvOne like this.
  16. basaragbi

    basaragbi

    Joined:
    Dec 2, 2014
    Posts:
    3

    Thank you for your time.

    So, it seems that the process is not very agile to make changes during the work time.
     
    EvOne likes this.
  17. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    114
    It would be nice to be able to bake 2d animations to spritesheet images.
     
  18. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    We have plans for this but unfortunately, there is no timeline for it as of now
     
    natereesedev likes this.
  19. bearcoree

    bearcoree

    Joined:
    Mar 8, 2016
    Posts:
    72
    I've looked into this but I can't figure out how to set the vertex data back into the SpriteRenderer.
    I don't see an obvious SpriteRenderer.SetVertexData or something. How does it work?

    The SpriteSkin.cs seems to use this method called InternalEngineBridge.SetDeformableBuffer(spriteRenderer, inputVertices);

    I don't seem to have access to it in my scope.
     
    Last edited: Oct 12, 2020
  20. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    I'd just like to touch base on an issue I came across just now
    (if it's a known 2DAnimation-problem/or perhaps just a bug in my project).

    I added post-processing and bloom to my Main Camera. When I add materials with HDR to sprites in my scene, I get the following error that refer to the IKEditorManager when I change material's HDR color (see attached image for details).
    This error occurs even when I'm changing sprites that are unrelated to 2DAnimation, like the little house in the image I attached below:



    My Unity version is 2019.4.12f1, and my 2D IK is the latest stable version. Perhaps I'm doing something wrong? Super odd!
    Anyone had similar behaviour? Does anyone know of this bug?
    Thanks in advance!

    Edit: If anyone gets the same problem, my temporary fix for this has been to remove the IK-package from the project. This worked and the errors no longer occur, and is OK for me because I'm not using 2D IK-system. That means it may not be a possible solution for you (if you're using the IK).
     
    Last edited: Oct 12, 2020
  21. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    599
    It's actually not out of preview, because after 30 or so bones in the scene you dip below 60 FPS. Without collections (which you guys removed from 2020), 2D bones are completely unusable. It's still effectively in preview.
     
    EvOne likes this.
  22. ktest112233

    ktest112233

    Joined:
    Jan 7, 2019
    Posts:
    37
    Hi,

    Is there a way to add bones and auto generate geometry via C# script and not the Skinning Editor?

    I want to programmatically add bones and have them at a precise angle (0, 15, 30 and so on) and have the same length, which I can't do it manually using the mouse
     
    Last edited: Oct 17, 2020
    EvOne likes this.
  23. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    I stress-tested 2DAnimation with bones not too long (you can see my post here: https://forum.unity.com/threads/rel...-animation-plugin.369291/page-14#post-5459313 ) and found that it performed the same as Anima2D (with the Burst and Collection packages). Did not know about Collections being removed in 2020. Makes me a little nervous to think it may make 2DAnimation perform less ideal, does it significantly affect fps?
    Crossing my fingers it'll be sorted out if it's the case, 2DAnimation is such a fantastic tool!
     
  24. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    599
    Yeah, there are a number of factors that affect FPS, but without collections, all it takes is a single character with around 15 bones for me to drop below 60 FPS in the editor. As far as I'm concerned, the 2D animation package is completely unusable without burst and collections. Test it for yourself and you'll see.

    Also, for 2020, collections is gone, but you can get it easily by downloading jobs (collections is a dependency); you just need to download an older version of jobs; the newest version has collections 0.9.0 as a dependency which gives a red error. You need to find a version of jobs that has collections 0.8.0 as a dependency.
     
  25. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    Thank you for your reply!
    I'm currently using Unity 2019.4.12f1 (latest official & stable Unity LTS release) so I probably won't have a problem until I need to upgrade to 2020 then. With Burst and Collections I'm at ~ 200 fps (despite using 2DAnimation with loads of bones/sprites), which is very nice.

    I'm very grateful you wrote down the hack-steps on how to keep collections on the 2020 version. I think it may also help others who may see a significant drop in fps after upgrading to 2020 and loosing collections. I will follow your steps if needed for sure when the 2020-version becomes official!
    (However, crossing my fingers there's an official Unity 2DAnimation guide on how to keep the nice performance in the 2020-Unity-version by then :) if it's still a problem)
     
    EvOne and Unrighteouss like this.
  26. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    Thanks, we will put in a fix for this soon.
     
    HuldaGnodima likes this.
  27. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    We have updated the 2D Animation package to support Collection 0.9.0 for 2020.1 and 2020.2. It should be available for download.
     
    HuldaGnodima likes this.
  28. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    599
    Hey, thanks for the reply; I checked this in 2020.1.9f1 (current latest version of 2020.1) and I couldn't find the collections package, but I got it as a dependency through jobs. I'm assuming you guys implemented some fixes, because collections 0.9.0 and up are no longer giving red errors, which is great!

    Thanks for doing this, makes getting set up with 2D bones a lot easier.
     
    HuldaGnodima likes this.
  29. natereesedev

    natereesedev

    Joined:
    Jul 6, 2020
    Posts:
    10
    I've really enjoyed using the 2D tools across the board. You guys have done a wonderful job integrating them! I was wondering if we might expect to see features like FFD or Mesh Point Level Animation down the line to do some more advanced animations like you can do in packages like Spine and Puppet2D. Is there a specific roadmap or trello for 2D features?
     
    bearcoree and HuldaGnodima like this.
  30. bearcoree

    bearcoree

    Joined:
    Mar 8, 2016
    Posts:
    72
    I made a custom implementation of FFD for the package, but it's far from perfect: https://forum.unity.com/threads/2d-animation-is-out-of-preview-for-2019-3.818724/page-4#post-6122726
     
    natereesedev likes this.
  31. natereesedev

    natereesedev

    Joined:
    Jul 6, 2020
    Posts:
    10
    @Democore thanks so much for making / sharing this. You came up with a nice solution!
     
    bearcoree likes this.
  32. vaughncrimson

    vaughncrimson

    Joined:
    Nov 14, 2016
    Posts:
    8
    Hello,

    Great job on this package. :D

    Is it possible to expose sprite skin's rebind method
    or call rebind when the associated sprite renderer's sprite changes?

    I am encountering an issue when I am changed the sprite programmaticaly via sprite resolver (please see images below).

    Code (CSharp):
    1.              
    2.                 spriteResolver.SetCategoryAndLabel(equipmentSpriteOverride.Category, equipmentSpriteOverride.Label);
    3.                 spriteResolver.ResolveSpriteToSpriteRenderer();
    4.  
    I guess this has something to do with the sprite skin's bones not being updated.
    I also noticed that sprite skin's bones is only updated on rebind which is only called in sprite skin editor.
    Is this expected?


    when set via editor
    upload_2020-10-30_10-53-35.png

    when set via code
    upload_2020-10-30_10-52-54.png

    edit:
    the problem only seem to occur when sprites within the category have different bone influences.
     

    Attached Files:

    Last edited: Oct 31, 2020
  33. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    Yes, we are working on this for the next version.
    For the time being, SpriteSwap has the limitation where the Sprite that you swap in needs to have the same bone influence as indicated in the SpriteSkin component.
     
  34. vaughncrimson

    vaughncrimson

    Joined:
    Nov 14, 2016
    Posts:
    8
    Great! Thanks for the confirmation.
    Looking forward for the next update!
     
  35. Kolai_Ua

    Kolai_Ua

    Joined:
    Nov 18, 2017
    Posts:
    1
    Hi guys! I've been working with a new 2D editor for several days. I must say that it is very impressive considering that it is still in beta. First of all, I want to thank the whole Unity team, we need such a tool for a long time.
    But I found a very nasty bug. Sometimes, changes made in the skinning editor will not be saved. Have you noticed this?
     
  36. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    We would love to take a look at this issue. Would you mind filing a bug report so we can take a closer look?
     
  37. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    173
    So how did it all end?

    I'm just wondering ...
    Still, the years go by ...
    Has anyone already seen the Final Result? All this...

    -Working (for real) Importer, not destroying everything you have done after import for any sneeze?
    -Copying a finished rig to another prefab (not necessarily 100% identical)?
    -Or changing the skin without having to re-arrange all the bones and weights for the new graphics?
    (and not a word about ffd)

    Well, ok ... well, at least the positioning of the sprite with the SpriteSwap - at least it doesn't "fly off" anymore?

    Ah... no... I just checked...
    Everything is still...
    I can continue sleeping...
    Someday... Someone... Somehow...
    may be...

    Dear Developers! -Good luck to all of you, HEALTH and happiness!
    Let everything be wonderful with you!
    And... Let your 2D Animation Package will become everyone's favorite and the ONLY NECESSARY for working with 2D in Unity Tool!
    Please - make us happy!

    Last time I wrote a letter to Santa, asking to help you ...
    It seems to me that this year it is necessary to repeat the letter - probably he did not receive it ...
    :oops:

    from last December:
    Dear Santa...
     
  38. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Hello @EvOne,
    Thank you for your holiday post. I must have missed it last year. But I am happy to have spotted it this year.

    Working (for real) Importer, not destroying everything you have done after import for any sneeze?
    Could you elaborate a bit on what does not work with the PSD Importer?

    Copying a finished rig to another prefab (not necessarily 100% identical)
    and
    Or changing the skin without having to re-arrange all the bones and weights for the new graphics?
    Could you elaborate a bit more on these? How would the workflow look like?

    at least the positioning of the sprite with the SpriteSwap - at least it doesn't "fly off" anymore?
    This is all about setting the pivot of the sprites that you would like to swap. Have you given that a go?

    Thank you for your feedback, and happy holidays!
     
  39. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    114
    I'm not sure if I missed something. If I use .psd files, unity will see those as a single image. If I want to import individual layers from a .psd file, I have to change the format to .psb, but my image editor doesn't play well with .psb so I have to manually convert back and forth .psb and .psd everytime I want to change something.

    Is there a way to import individual layers from a .psd file?
     
  40. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Currently the PSD Importer only supports .psb files. As the package's name suggest, we would like to support .psd files with the package in the future, but we do not have a set timeline for when that will happen.
     
  41. grigorimagid_unity

    grigorimagid_unity

    Joined:
    Jan 9, 2020
    Posts:
    3
    Unity Hi, Please Assist.

    my sprite editore weight slider doesn't work as shown in the video it is off. I'm using unity 2019.4
     
  42. bearcoree

    bearcoree

    Joined:
    Mar 8, 2016
    Posts:
    72
    I think you need to select a vertex to adjust weight via the weight slider.
     
  43. bearcoree

    bearcoree

    Joined:
    Mar 8, 2016
    Posts:
    72
    Working (for real) Importer, not destroying everything you have done after import for any sneeze?

    When I rig a psb and then I notice I need to change the psb, the importer gets confused because the generated spritesheet from the psb is now different. This results in vertices not being correctly placed on the spritesheet anymore, thus all the rigging I did needs to be redone. (This can result in hours of work being wasted, especially on more complex psb's)


    Copying a finished rig to another prefab (not necessarily 100% identical)
    and
    Or changing the skin without having to re-arrange all the bones and weights for the new graphics?
    Could you elaborate a bit more on these? How would the workflow look like?

    When I have a fully rigged psb and I import another psb, that just has 1 layer more or less, I can't copy the weights from my fully rigged psb to my new psb. Instead I have to assign the weights of each bone to each sprite again, even if the two psb's are almost identical.


    Thank you very much for getting back though! It's super appreciated <3
    PS.: FFD pls c:
     
    EvOne likes this.
  44. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    323
    Were you able to improve it? I have the same problem, 60fps drops to 6fps just by using a simple SpriteSkin.
     
  45. bearcoree

    bearcoree

    Joined:
    Mar 8, 2016
    Posts:
    72
    Heya, we have experienced heavier fps drops in webgl too. It seems that the largest problem is the vertices count. Reducing it has resulted in significant performance improvements for us. (from 10 to 90 fps)

    The largest reduction in vertices was possible by reducing any mesh that is only effected by one bone to 4 vertices forming a square. I wrote a script modifying the editor code of the 2d animation package to make it easier, I can highly recommend this approach!
     
    EvOne likes this.
  46. DarkWarriorZ

    DarkWarriorZ

    Joined:
    Jan 15, 2020
    Posts:
    2
    WOW THIS WORKS GREAT!!!

    I had 50 fish in my day that had roughly 10 bones each and before I installed Burst and Collections I was only getting 32 FPS and it now runs at 130 FPS!!!

    Thank you for the simple performance upgrade hehe
     
    Ted_Wikman likes this.
  47. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    Which software are you using to modify your Photoshop file?
    Would it be possible to send us the before and after change?
     
  48. alexlamar

    alexlamar

    Joined:
    Jan 16, 2014
    Posts:
    8
    I have some feedback for the 6.0 pre-release, particularly around the new Sprite Key animation property in the SpriteResolver module.

    In my project, I make use of being able to swap between multiple categories on a SpriteResolver to swap out different orientations of my sprite (i.e. a front orientation, and a back orientation). In 5.0, as long as each orientation carried the same bone structure/hierarchy, this worked pretty well. Here's an example:

    Screen Shot 2021-02-16 at 7.39.41 PM.png

    This in turn lets me create higher-fidelity 2d animations with orientation-switching, like so:

    Screen Shot 2021-02-16 at 7.41.36 PM.png


    Screen Shot 2021-02-16 at 7.42.45 PM.png

    Importantly, though, is that the character can have different "outfits", which are changed in and out via the Label hash, independently of the animation. This worked fine in 5.0 because the Category and Label hash were keyed separately, and you could bring in only the Category hash while animating, preserving the current "outfit" and associated SpriteResolver labels throughout the animation. Now, with both keys being combined into the single Sprite Key hash, this becomes impossible, and changing a category mid-animation will also change the character's current "outfit" to whatever is keyed in the animation.

    I feel like I'll have to introduce a much more complicated system to achieve this same workflow (one solution, carrying around multiple sprite libraries/bone structures and enabling/disabling them as needed, might be workable but definitely feels cumbersome, and for instance wouldn't let you combine multiple orientations into a single pose. At least not elegantly).

    Would it be possible to preserve Category and Label as separate animatable properties in 6.0 (maybe as an override?)? I feel like Sprite Key, while a convenience for simple use-cases, severely hampers more complicated workflows like the above.
     
    puppeteer likes this.
  49. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Thanks @alexlamar for the feedback.
    In 2D Animation 6.0, we went for the unified hash value instead of the split Category and Label value because of two reasons
    1. When working with the SpriteResolver API, the Category and Label is used as a pair. You cannot set the values one by one. To mirror the API in the animation clip, we went with the "pair" approach, where the hash is the combined value of both Category and Label.
    2. We are aware that the hash value is not the ideal way to visualize which Sprite will be swapped in a keyframe. Ideally, you should be able to see the Sprite that will be swapped in. In preparation for UI improvements, we went with a single hash value.

    For your specific case, we have an example in the 2D Animation Samples, called Runtime Swap. Here we create an override entry to a selected sprite library at runtime. This works really well if you would like to swap out pieces of the character during runtime, while not touching the animation system.

    Have a look at this example, and let us know how it goes.
     
    EvOne likes this.
  50. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    173
    Hi!
    Maybe I'm doing something wrong - tell me, please ...
    -How can I get acquainted with all the wonderful innovations in the 2D Animation Package version 6.0?
    -Even in the just released Unity beta 2021.1.0b7 - I still don't have the 6th version of the Package in the package manager:

    2021-02-18_15-37-45.png
     
Thread Status:
Not open for further replies.