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

Sprite Skin Script low performance

Discussion in '2D Experimental Preview' started by ETGgames, Sep 19, 2019.

  1. ETGgames

    ETGgames

    Joined:
    Jul 10, 2015
    Posts:
    101
    When I have about 20 or 30 objects with sprite skin scripts generated from the skinning editor, I get some serious performance issues. 15fps from 100. Is this expected? Is there a way to improve performance? I was really looking forward to using this to animate all my enemies and objects, but now I might have to resort to using an external editor, and importing the images frame by frame :(
     
    awsapps and rvinowise like this.
  2. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    644
  3. YKpro

    YKpro

    Joined:
    May 14, 2013
    Posts:
    12
    same problem here!
    the performance cut is huge!!!
    and I have already upgraded to latest version 3.0.5;
     
  4. ETGgames

    ETGgames

    Joined:
    Jul 10, 2015
    Posts:
    101
    On latest version of 19.3, still horrible horrible performance with just 1 sprite skin in the scene. The profiler says its eating up 60% usage!!
     
    rvinowise and akasabutski like this.
  5. cyanryanlion

    cyanryanlion

    Joined:
    Feb 17, 2020
    Posts:
    25
    I was running into the same issues. Make sure you guys have both the Collections and Burst packages installed as well from Package Manager. The performance improvement for SpriteSkin is dependent on having these packages installed.

    I find it a bit ironic as without these "optional" packages the performance of SpriteSkin makes it pretty much unusable in what I've seen at least :(. Also, if you're on a platform that doesn't yet support burst (such as WebGL, see support here: https://docs.unity3d.com/Packages/com.unity.burst@1.3/manual/index.html#standalone-player-support) then you sadly can't benefit from this performance boost either and so SpriteSkin is kinda unusable there too. I hope they improve the performance of it via the non-burst route because apart from this I really like the 2D Animation stuff.
     
    fdieguez1, rvinowise, Upian and 2 others like this.
  6. Cloky

    Cloky

    Joined:
    Sep 6, 2019
    Posts:
    4
    @ryaanjpf 's answer helped me enormously. My FPS quadrupled after downloading both Packages.

    For anyone having problems: for me, the latest version of Collections didn't work. I had to downgrade to Collections Version 0.8.0.
     
    Upian likes this.
  7. YURI_uwu

    YURI_uwu

    Joined:
    Mar 12, 2019
    Posts:
    12
    Why can't i find Collections in Package Manager?
     
  8. YURI_uwu

    YURI_uwu

    Joined:
    Mar 12, 2019
    Posts:
    12
    Oh found it! Just click advanced > show preview packages
     
  9. aromana

    aromana

    Joined:
    Nov 11, 2018
    Posts:
    137
    Just wanted to say that my project saw a DRAMATIC performance improvement on Android from installing Burst+Collections. Sprite mesh deformation was previously taking 40ms per frame (!), down to just several ms. This should really be documented somewhere...
     
  10. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Thanks for letting us know @aromana! We are happy that you enjoy the speed ups. Like I wrote in another thread, we have also published this information in YouTube videos, blog posts and on the front page of the package documentation. But it seems that we still have quite the way to go until it is well known. I'll take this with me to the team to see how we can improve the message out to the rest of the dev community.

    We are also aiming to make Burst and Collections packages dependencies of the 2D Animation package in a future release of 2D Animation. This will enable all users to get the performance boost by default.
     
    aromana likes this.
  11. Skar_Universe

    Skar_Universe

    Joined:
    Sep 26, 2016
    Posts:
    5
    Does this performance boost also work on 2021.1? I can't find Collections in the Package Manager even with preview packages enabled.
     
  12. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Yes, it works in Unity 2021.1 but requires a few new steps. We explain these steps in this post. Have a look and let us know how it goes!
     
  13. jwho303

    jwho303

    Joined:
    Jul 23, 2015
    Posts:
    8
    a pain to add it in Unity 2020.3.14
    I had to "add by git URL" with "com.unity.collections@0.17.0-preview.18" or "com.unity.collections@1.0.0-pre.5" after looking up the packages names here
     
  14. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Thank you for flagging this @jwho303
    Since the Collections package is a preview package, I saw that the install section in 2D Animation 5.x (Unity 2020.3) documentation is lacking the additional steps which are now required. We have these steps listed in
    - 2D Animation 6.x (Unity 2021.1)
    - 2D Animation 7.x (Unity 2021.2)
    I'll make a note that we should backport this information to 2D Animation 5.x and 2D Animation 3.x to reduce the confusion.