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

Official 2D Animation Preview Packages

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

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

    Arnklit

    Joined:
    May 18, 2015
    Posts:
    48
    I'm running into the same issue using 2019.2.9f1. I have a couple of skinned characters in my scene and it's taking 25ms per frame for SpriteSkin.LateUpdate().

    Update
    Looking through the documentation and change logs it mentions that you can use a performance improvement by installing the Burst compiler package. I'll try that now, but you need to be using version 2.2.1 of the package

    https://docs.unity3d.com/Packages/com.unity.2d.animation@2.2/changelog/CHANGELOG.html
    https://docs.unity3d.com/Packages/com.unity.2d.animation@3.0/manual/index.html

    Update 2
    Tried it with the Burst compiler package installed. It automatically set the optimization option and immediately solved the issue. Now the overhead seems negligible.
     
    Last edited: Nov 19, 2019
    Agentneil likes this.
  2. Arnklit

    Arnklit

    Joined:
    May 18, 2015
    Posts:
    48
    Is there any way to get the animation preview pane to work with these rigs so it's possible to preview animation transitions etc.?
     
  3. bpolaro

    bpolaro

    Joined:
    Mar 24, 2014
    Posts:
    17
    copied my project to another pc. runs ok, but the sprite skins are gone if i enable the bones. is there an issue with running a project on anther pc? using the same editor version and using the preview package.
     
    EvOne likes this.
  4. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    Not at the moment but we will put this in our backlog to work on it.
     
  5. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    Will you be able to share your project? You can drop me a PM
     
  6. bpolaro

    bpolaro

    Joined:
    Mar 24, 2014
    Posts:
    17
    sent the project to you via google drive in PM. too big for uploading here.
     
    Last edited: Jan 13, 2020
  7. LeleUnity

    LeleUnity

    Joined:
    Jul 30, 2016
    Posts:
    97

    I FOUND A BUG:
    that gives me:

    "Invoking TextureImporter.GetWidthAndHeight() failed: System.Reflection.TargetException: Non-static method requires a target.
    at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0004c] in <437ba245d8404784b9fbab9b439ac908>:0
    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <437ba245d8404784b9fbab9b439ac908>:0
    at TPImporter.TexturePackerImporter.GetOrigImageSize (UnityEngine.Texture2D texture, UnityEditor.TextureImporter importer, System.Int32& width, System.Int32& height) [0x00073] in <cfda03865c6248fa96ca96afc319bd04>:0
    UnityEngine.Debug:LogError(Object)
    TPImporter.TexturePackerImporter:GetOrigImageSize(Texture2D, TextureImporter, Int32&, Int32&)
    TPImporter.TexturePackerImporter:OnPostprocessTexture(Texture2D)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    HOW TO TRIGGER IT:
    1)-include IKs and solver in your gameobject, thus, make an IK solver on a leg, on arms and so on.
    2)-Open the PSB file and change the layer orders. plus take a layer out of group folder in Photoshop.
    3) when you come back into unity it gives this error and it cannot update the prafab into the scene.

    How to solve it?

    If you want to make that the PSB layers reflect the same object hierarchy, you should make it resilent to any changes tat are made on the objects, like adding IKs and so on..
     
  8. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    Could you file a bug on the issue so that we can keep track of it and look in to it as well. Thanks!
     
  9. LeleUnity

    LeleUnity

    Joined:
    Jul 30, 2016
    Posts:
    97
    where? how ?
     
  10. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    570
  11. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    In Unity, click on 'Help' on the menu bar and select 'Report a bug'
     
  12. LeleUnity

    LeleUnity

    Joined:
    Jul 30, 2016
    Posts:
    97
    My PSB file shows this structure inside UNITY in the project view:
    -Character
    ---->ARM
    ---->LEG
    ---->TORSO
    BUT IS NOT ALIGNED TO WHAT IS in PHOTOSHOP! ( where is instead LEG,ARM,TORSO)
    if I open it in photoshop it shows a different order.

    It seems the order is respected in Unity only in Sprite sorting Layers but NOT in the object's structure.

    How can I force UNITY to have the object structure like the PSB file in photoshop?
     
  13. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    Hello, I just want to know if its posible to animate elements in the sprite resolver. Im using for mouths and eyes, but if i tried to use at animation (for example, talking), it just show up in timeline, but when i run animation, change in sprite resolver is not happening :( .

    Help? :oops:
     
  14. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    Try setting the tangent mode for the keyframes to constant.
     
  15. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    Thanks! Already works with that. I haven't notice that small detail :p
     
  16. LeleUnity

    LeleUnity

    Joined:
    Jul 30, 2016
    Posts:
    97
    about "
    Copy and Paste Skeleton Rigs" could you make a video tutorial on this? I tried clicking copying and pasting to another character but nothing happens.
     
  17. samvis

    samvis

    Joined:
    Oct 14, 2014
    Posts:
    6
    Hi, how can I change length of the bone in runtime using script? I can change position of first joint of bone by changing position of bone's gameobject, but I do not know how to change position of second joint such that length of bone is altered.
     
    EvOne likes this.
  18. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    Hello!

    I'm loving the 2DAnimations-system. I wanted to use it to animate Dialog-portraits, but it struck me that the 2DAnimation bones and rigging probably doesn't support rigging UI Images (at least I dont know how).

    Do you have advice on how I could animate portraits with the 2dAnimation, and use these animations in my UI Dialog (so that they appear together with the rest of my UI, scales automatically with UI, and renders in front of everything)?
     
  19. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    I JUST got stuck on this, and after hours of looking found a blurb in a video on how you achieve this!

    Watch this video (on the 38:00 mark):


    He goes through how you do it step by step. The copy/pasting is done in the Sprite Editor. I was confused by exactly the same thing you were :)
     
    LeleUnity and EvOne like this.
  20. LeleUnity

    LeleUnity

    Joined:
    Jul 30, 2016
    Posts:
    97
    could you add CLOTHES or WIND effect support? to deform clothes, scarfes, flags and so on with the wind?
     
    HuldaGnodima likes this.
  21. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    I also wonderef if it's possible to add clothes easily, and specifically clothes that have their own bones? So perhaps they have additional bones to the character's that need to be turned "on" if the player is wearing that outfit. Is this possible?

    What is the praxis when doing this in 2DAnimation? Additionally I'm wonderfing if there's a possibility to hide certain sprites in the Skinning Editor? Sometimes I have several images layered on top of each other, and I cannot properly edit the image underneath another (example: A shirt is covering an arm).

    Thanks in advance!
     
    EvOne likes this.
  22. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    173
    Yes, of course, this tool is already available in the editor:
    2020-01-29_04-50-12.png
     
    HuldaGnodima likes this.
  23. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    Thank you so much! I hadn't seen this, it made my workflow so much easier :)
     
    Last edited: Jan 30, 2020
    EvOne likes this.
  24. AapgScorpion

    AapgScorpion

    Joined:
    Nov 15, 2018
    Posts:
    2
    Is there a way to dynamically add the PSB files to the scene via C#?
     
  25. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
    LilGames likes this.
Thread Status:
Not open for further replies.