Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official 2D Animation Preview Packages

Discussion in '2D Experimental Preview' started by rustum, Mar 14, 2018.

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

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    25
    I have a problem using this package...

    I follow step by step of the tutorials/videos:

    1. Install the package.
    2. Go to the Sprite Editor.
    3. Bone Editor: create the skeleton.
    4. Create the Geometry.
    But!
    When I come to the Weights and click AUTO to autoGenerate the weights of the bones... NOTHING HAPPENS!

    No change the color of nothing, no information messages, no error... Only Silence!

    I repeat it a lot of times but with the same result... Please, what step I have lost?

    I'm using UNITY 2018.2.17f1 on Mac.

    Any help is welcome.
     
  2. antk

    antk

    Joined:
    Dec 10, 2013
    Posts:
    24
    when you are generating geometry, what values are you using for outline detail, tolerance, and subdivide?
     
  3. antk

    antk

    Joined:
    Dec 10, 2013
    Posts:
    24
    Is there any follow up on this? Or anyone have some insight on how to do this? I'd like to use a different body part sprite for a few frames of animation, but I couldn't figure out how to do this within the 2d animation package. I ended up creating a separate game object and animating that and activating and deactivating via code. Seems like a janky way to go about it though. Is there a cleaner, more robust way?

    Thanks!
     
  4. jalemanyf

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    25
    I have Tested different values...

    The last ones are:

    Outline detail: 0.25

    Alpha tolerance: 65

    Subdivide: 45

    Any idea what I’m doing wrong?

    Thanks
     
  5. antk

    antk

    Joined:
    Dec 10, 2013
    Posts:
    24
    Hmm, not sure why that would cause any problems. It may not give a very precise outline, but it should still at least generate vertices. The values I used for my sprite were 1, 254, and 100 respectively. Can you try that and see what comes out of it? Just curious.
     
  6. jalemanyf

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    25
    Hi
    Hi antk,

    I have changed the Values on Geometry for 1,254,100 and Generate...

    Now the SpriteMesh is very very detailed! With a lot of point and subdivisiones. OK...

    After that, I try two workflow:

    1.-Click Apply and after the computer process, Weights: I see all the bones with colours and the generated geometry.

    2.-Go directly to Weights ( without click Apply before )

    When I finally clicks on Auto... If doesn’t works!

    Could you say me step by step what you do... probably I forget something.
     
  7. antk

    antk

    Joined:
    Dec 10, 2013
    Posts:
    24
    Here's what I do:
    Import Sprite Asset
    Click newly imported sprite asset
    Click "Sprite Editor" in Inspector
    Click Bone Editor submenu
    Add bones, click Apply
    Click Skin Weights and Geometry Editor submenu
    Click Generate
    Fill values 1, 254, 100, click Generate button
    Click Apply
    Click Weights
    Click Auto
    Move some bones around to see that bones are moving and deforming mesh as expected
    Click Apply

    At that point you should be able to bring in the sprite to the scene, add the SpriteSkin component and start arranging and animating your sprite.

    Hope that helps.
     
  8. jalemanyf

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    25
    It still not works Ank, but thanks a lot Antk for your help and patience.

    If I discover something about what happens I will share to other ones.

    Regards,

    Josep Alemany
     
  9. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Hi, can you please send a bug report? Thanks

    Weight generation might fail in some circumstances. We fixed some bugs in the next version that will reduce those cases.

    If both sprites share the same bones you should be able to swap them in the animation clip. If that's not the case, you did the right thing. Next version of the tools will enable multiple sprites sharing the same skeleton.
     
    Peppered_Pig and antk like this.
  10. HEROTECH70

    HEROTECH70

    Joined:
    May 24, 2017
    Posts:
    74
    Has anyone had any issues on iOS?

    My app has content which is downloaded with an asset bundle, on android it works fine, on iOS nothing is moving.

    I have not time to investigate this right now, will try to reproduce the issue on monday, just wanted to know if this is a known issue.
     
  11. b-king123

    b-king123

    Joined:
    Mar 1, 2017
    Posts:
    2
  12. nsfnotthrowingaway

    nsfnotthrowingaway

    Joined:
    Feb 18, 2016
    Posts:
    48
    @Sergi_Valls is it possible to set weights, vertices, etc of a spritemesh at runtime, even if it involves some roundabout method. Say if you wanted to make a runtime importer from another format that would control spriteRenderer or spriteMesh. I realize some of these values are hardcoded into the sprite asset, but I was hoping there was a way to directly inject the weights or final positions for the deformable mesh vertices to supersede the ones in the sprite asset. I'm particularly interested in a way to procedurally generate a mesh each update. I'm asking not about the math required to determine weights and such, but just how to get access to set those values for the renderer once you already have them.
     
    Last edited: Dec 8, 2018
  13. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    36
    Is it possible to switch the sprite to a similar one (via script) after applying bones to it ?
     
  14. Peppered_Pig

    Peppered_Pig

    Joined:
    Oct 28, 2016
    Posts:
    9
    I'm sure all are answers are gonna be answered soon :) but just to throw it out there I hope we don't have to create and bind spritemeshes to bones every time like we did in Anima2D. It was a real hassle and didn't work properly most of the time. I hope we can easily be able to swap sprites without having to make sprites meshes and binding it to the bones.
     
  15. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Please report a bug. Thanks!

    You can set the data into the Sprite by using this API: https://docs.unity3d.com/ScriptReference/Experimental.U2D.SpriteDataAccessExtensions.html
    To set the final deformed positions into the SpriteRenderer: https://docs.unity3d.com/ScriptReference/Experimental.U2D.SpriteRendererDataAccessExtensions.html

    You can switch the sprite in the SpriteRenderer via script. The only requirement is the bone list should be compatible.

    We are aware of the need for swapping sprites. Unfortunately this release won't bring specific improvements on that.
     
  16. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    36
    I managed to switch sprites via code (only after adding new bones to the new sprite) and I got an error:
    "Unable to use a named GUIStyle without a current skin. Most likely you need to move your GUIStyle initialization code to OnGUI
    UnityEditor.SpriteEditorWindow:OnEnable()"
    but still things seems to be working.
    I will try to dig in and see if I can fix it.
     
  17. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    36
    Edit: the error was the "Sprite editor" docked on screen. Everything seems to be working.
    It will be cool to have the option to swipe sprites without making bones per sprite in the future.
     
  18. HEROTECH70

    HEROTECH70

    Joined:
    May 24, 2017
    Posts:
    74
  19. nsfnotthrowingaway

    nsfnotthrowingaway

    Joined:
    Feb 18, 2016
    Posts:
    48
  20. zinkomania

    zinkomania

    Joined:
    Dec 10, 2018
    Posts:
    1
    Hey Guys today I encountered this Error with my 2D-Bones Animation. Somehow Unity is changing the values of rotation to obscure numbers. I have tried reinstalling Unity and the package but it didn't help. Hope someone can help me. I uploaded a Video because it's hard to explain.
     
  21. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    322
    @zinkomania I always had this exact same problem when Animating Rotations on Unity. But I've always had trouble explaining it. I cannot animate any rotation using the Gizmoz or swapping the values on it in the inspector. It always animated OK but it saves keyframes with huge values a lot different than the one I just rotated.

    As a workaround, I have to expand and click twice on the keyframe value on Animation Window (left side of your screen) and then Change the Value There. Is the only place where it works as expected! I hope now Unity can take a look better on this!
     
  22. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    322
  23. antk

    antk

    Joined:
    Dec 10, 2013
    Posts:
    24
    Thank you for replying and keeping us up to date!
     
  24. learc83

    learc83

    Joined:
    Feb 28, 2018
    Posts:
    41
    2018.3 was released today. Does that mean that phase 2 will be released as well?
     
    Peppered_Pig and b33rdy like this.
  25. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Looks like an SpriteEditorWindow error log. Should not affect swapping Sprites in the SpriteRenderer.

    Thanks for the report. It is true that AssetBundles can't contain code. Cases like this will help us improve our transition into packages.

    In 2018.x we have an experimental api to ask SpriteRenderer for a native buffer (NativeArray<Vector3>). That buffer has a length of sprite's vertex count. You can fill it with your own values inside a job and pass back the job handle to the SpriteRenderer.
    In 2019.1 we already changed that into something we can use with ECS.
    In conclusion, careful with experimental apis that can change from version to version.

    Please, make a bug report and make sure you include the video. Thanks.

    Thanks, very useful, we are investigating it.

    We are planning on releasing today.
     
    Peppered_Pig likes this.
  26. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    623
    It would be super useful to implement Free Form Deformation for 2d in this package or an extra package. Do you have any info?
     
    Peppered_Pig likes this.
  27. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    36
    Just updated to Unity 2019.1.0a11 and got :
    "GetBoneWeights' and no extension method `GetBoneWeights' of type `UnityEngine.Sprite' could be found."
    "UnityEngine.SpriteRenderer' does not contain a definition for `UpdateDeformableBuffer' and no extension method"
    and many more. Any idea what going on?
     
  28. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    36
    Anyone can help me with those errors?
     
  29. Peppered_Pig

    Peppered_Pig

    Joined:
    Oct 28, 2016
    Posts:
    9
    I was thinking, are future releases of the 2D animation package going to be supported throughout the Unity 2018 life cycle or will we have to upgrade to a newer version of Unity in the future to get the latest features from the 2D animation package?
     
  30. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    36
    "2D animation" is updating with the Unity version, and I think my problem right now is that the "latest" version I have is 2.0.0 and it doesn't match Unity 2019.1.0a11.
     
  31. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    623
    Any info about the FFD feature?
     
  32. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    173
    Button "Revert" in Skinning Editor near button "Visibility" without confirmation and the possibility of "Undo casual Reverting" - its awful :(((
    -The long process of editing a complex Rig with many overlapping parts is destroyed by one mistake pressing the button next to it ... :(((

    PS Sorry for googletranslate.
     
    Last edited: Dec 15, 2018
  33. Vasiliy-V-V

    Vasiliy-V-V

    Joined:
    Dec 9, 2013
    Posts:
    7
    @Sergi_Valls Hello!

    I have installed 2D Animation 2.0.0-preview.1. In Skinning Editor window when I select Create Bone and click to make a bone nothing happened. In 2D Animation 1.0.16-preview.2 all works and bones adding succesfully. Unity 2018.3.0f2, Windows 7.

    It's a bug or problem only on my side?
     
  34. IShol

    IShol

    Joined:
    Jun 26, 2015
    Posts:
    17
    several simple animated characters on scene and very low FPS! :(
     
    EvOne likes this.
  35. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
    Deleted User and b-king123 like this.
  36. GerPronouncedGrr

    GerPronouncedGrr

    Joined:
    Mar 30, 2013
    Posts:
    25
    Using Unity version 2018.3.0f2, after adding target transforms to a limb solver, the Create Effector button is greyed out (and it actually still says Create Target). Additionally, the yellow circle gizmos do not appear. I also encountered a similar problem when using a CCD solver, where I was unable to change the number of chains from zero (the slider has no button/handle on it at all), and also could not generate an effector. I was following the Unity blog post tutorial when this happened, and have attempted it twice from scratch. As far as I can tell, I have followed the steps exactly.
     
    Jimbo_Cymru likes this.
  37. ChaosResolution

    ChaosResolution

    Joined:
    Jan 22, 2013
    Posts:
    80
    Hi,

    I just updated the 2D Animation package to version 2.0 but Package Manager is giving the following error:



    I assume this error with the 2D PSD Importer is related:



    Any idea what this means?

    Cheers!
     
  38. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    70
    Hi ChaosResolution,

    This could be a Library folder PackageCache path conflicting with multiple of the same packages.

    Have you tried a reimport of the package or the whole project?

    ===================

    If it still occurs,
    It would be best if you are able to file a bug report with a sample repro project through = Unity > Help > Report a Bug...
    or
    Let me know any more info you can provide here and I'll investigate it.
     
  39. ChaosResolution

    ChaosResolution

    Joined:
    Jan 22, 2013
    Posts:
    80
    I tried re-importing the project, but no luck. What does seem to work however, is using Version 2.0.0 - preview.1 (as opposed to the latest, which is Version 2.0.0 - preview.9.) With this version I get no errors and everything is functional. With the latest, the error returns.
     
  40. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    70
    I missed the numbering in your first image.
    Interesting.
    Our latest version is "Version 2.0.0 - preview.1"
    "Version 2.0.0 - preview.9" should not even be there.

    Perhaps the version stated in your Packages folder manifest.json file is wrong?
    Is it possible to share your manifest.json file?
     
  41. ChaosResolution

    ChaosResolution

    Joined:
    Jan 22, 2013
    Posts:
    80
    Sent in a DM!
     
  42. customphase

    customphase

    Joined:
    Aug 19, 2012
    Posts:
    243
    Unity 2018.3.1, 2D Animation 2.0.0 preview 1
    Cant remove bones in the skinning editor. Pressing "delete" on the keyboard or using Edit - Delete menu doesnt work. Cant see any other ways or tools to do so. Is it intended behaviour? There used to be a dedicated remove bones tool, but now its gone for some reason.

    DeleteOLD.png

    upload_2019-1-21_23-47-20.png

    Also the bone influence button is inactive for some reason:

     
    Last edited: Jan 21, 2019
  43. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    435
    To delete a bone
    1. Select a bone
    2. Click on 'Edit Joints' button
    3. Press delete key
     
    customphase likes this.
  44. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    435
    This is most likely you are using the staging package server. There was an oversight where an invalid package was deployed. The invalid package has been removed.
     
  45. george_00

    george_00

    Joined:
    Oct 23, 2015
    Posts:
    19
    This doesn't work for me. I cannot get rid of any bones, whatever I try.

    Also, I created bones for a sprite and an animation as per the blog post tutorial. When I press play, the animation plays as expected. But if I duplicate the sprite with the animation on it (I want more than one in the scene, exactly the same), and press play... the duplicate disappears from the scene.

    Is there another way to duplicate?
     
    customphase likes this.
  46. mmntlh

    mmntlh

    Joined:
    Feb 2, 2019
    Posts:
    11
    Capture.PNG Hello guys I need help:

    I am getting these errors after installing PSD Importer

    F:/Repos/Unity2D/TheAndroidGame/Library/PackageCache/com.unity.2d.psdimporter@1.0.0-preview.2/Editor/PSDPlugin/PsdFile/Layers/Layer.cs(190,25): error CS1738: Named arguments must appear after the positional arguments

    F:/Repos/Unity2D/TheAndroidGame/Library/PackageCache/com.unity.2d.psdimporter@1.0.0-preview.2/Editor/PSDPlugin/PsdFile/Layers/Layer.cs(190,25): error CS1738: Named arguments must appear after the positional arguments


    And in the skinning editor the bone influence option is also not activated, I can't select it
     
    EvOne likes this.
  47. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    322
    I'm trying to update my project to 2019.1b1 and I got these errors :

    Code (csharp):
    1. Library\PackageCache\com.unity.2d.animation@2.0.0-preview.1\Runtime\SpriteSkinUtility.cs(40,24): error CS1061: 'Sprite' does not contain a definition for 'GetBoneWeights' and no accessible extension method 'GetBoneWeights' accepting a first argument of type 'Sprite' could be found (are you missing a using directive or an assembly reference?)
    2. Library\PackageCache\com.unity.2d.animation@2.0.0-preview.1\Runtime\SpriteSkin.cs(180,47): error CS1061: 'Sprite' does not contain a definition for 'GetBoneWeights' and no accessible extension method 'GetBoneWeights' accepting a first argument of type 'Sprite' could be found (are you missing a using directive or an assembly reference?)
    3. Library\PackageCache\com.unity.2d.animation@2.0.0-preview.1\Runtime\SpriteSkin.cs(181,49): error CS1061: 'SpriteRenderer' does not contain a definition for 'GetDeformableVertices' and no accessible extension method 'GetDeformableVertices' accepting a first argument of type 'SpriteRenderer' could be found (are you missing a using directive or an assembly reference?)
    4. Library\PackageCache\com.unity.2d.animation@2.0.0-preview.1\Runtime\SpriteSkin.cs(189,28): error CS1061: 'SpriteRenderer' does not contain a definition for 'UpdateDeformableBuffer' and no accessible extension method 'UpdateDeformableBuffer' accepting a first argument of type 'SpriteRenderer' could be found (are you missing a using directive or an assembly reference?)
    5. Library\PackageCache\com.unity.2d.animation@2.0.0-preview.1\Runtime\SpriteSkinUtility.cs(214,38): error CS1061: 'Sprite' does not contain a definition for 'GetBoneWeights' and no accessible extension method 'GetBoneWeights' accepting a first argument of type 'Sprite' could be found (are you missing a using directive or an assembly reference?)
    6. Library\PackageCache\com.unity.2d.common@1.0.11-preview.1\Editor\InternalBridge\InternalEditorBridge.cs(108,43): error CS0507: 'InternalEditorBridge.WrappedShortcutAttribute.CreateShortcutEntry(MethodInfo)': cannot change access modifiers when overriding 'internal' inherited member 'ShortcutAttribute.CreateShortcutEntry(MethodInfo)'
    7. Library\PackageCache\com.unity.2d.common@1.0.11-preview.1\Editor\InternalBridge\InternalEditorBridge.cs(148,20): error CS0246: The type or namespace name 'ShortcutState' could not be found (are you missing a using directive or an assembly reference?)
     
  48. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    173
  49. mmntlh

    mmntlh

    Joined:
    Feb 2, 2019
    Posts:
    11
    EvOne likes this.
  50. michaeleconomy

    michaeleconomy

    Joined:
    Aug 28, 2018
    Posts:
    58
    Any idea when svg/vector graphic support will be ready? I'm considering using this for an upcoming project.
     
Thread Status:
Not open for further replies.