Search Unity

Sprite Skin Script low performance

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

  1. ETGgames

    ETGgames

    Joined:
    Jul 10, 2015
    Posts:
    44
    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 :(
     
    rvinowise likes this.
  2. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    478
  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:
    44
    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 daek_f like this.
  5. ryaanjpf

    ryaanjpf

    Joined:
    Feb 17, 2020
    Posts:
    16
    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.
     
    rvinowise, Upian, Cloky and 1 other person like this.
  6. Cloky

    Cloky

    Joined:
    Sep 6, 2019
    Posts:
    2
    @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:
    44
    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:
    440
    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:
    1
    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:
    440
    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!
     
unityunity