- Home /
Spriteskin.LateUpdate
hello everyone
so, i am about to finish my project and started adding the wanted amount of enemies in my scene. i noticed a huge FPS drop and checket the profiler. the profiler told me, that some "SpriteSkin.LateUpdate()" is making huge troubles, i wondered what that is and found out its from the 2D Animation package which i am using.
i googled a little, found some forums where people where talking a little bit about it .. sadly without any good solution.
do you guys know what we can do to solve this massive perfomance drop?
Same problem here. I've used 2D animation and 2D I$$anonymous$$ packages. Those is still in preview, so i hope this will be fixed. Also i've tried to build game. And fps are higher ethier than in play mode. But still, i have 12 instances of animated object, and fps are dropped from standard 60 to 45 fps in build too (12 fps in play mode). $$anonymous$$aybe this would be useful info.
Answer by Necrohunter · Dec 01, 2019 at 05:39 AM
ok so i made a simple work around. since we cant add hundrets of enemies (or whatever) in our scene, we are forced to only use a few.
my solution is to create empty gameobjects in the scene and everytime your character is about to reach this gameobjects, the gameobject spawns one of the enemie which i have to kill to get further in the level.
i just give the empty gameobjects a small CircleCollider2D and on my player i have a CircleCollider2D which is slighty bigger than my camera view. then i just triggerthe empty gameobjects with "OnTriggerEnter2D" and spawn one enemie.
its not a good solution, i am also somehow a beginner in unity and C#... but this solution works for me. if you got a better solution, please tell us, i would love to see it!
i hope i can help some of you guys :)
Answer by Runuchok · Dec 29, 2019 at 04:17 PM
Yay! Check this out - https://docs.unity3d.com/Packages/com.unity.2d.animation@4.0/manual/index.html "Optional Performance Boost. You can improve the animated Sprite deformation performance at runtime by installing the Burst and Collections package from the Package Manager." The package is currently tested based on Burst version 1.1.2 and Collections version 0.1.1-preview.
How to do it? (improve the animated Sprite deformation performance at runtime by installing the Burst)
Same as you installed 2d animation package, search for Burst in Package Manager.
So, I have installed both packages, Burst and collections, but improvement was only on pc. screen on pc:
but on my android, its a pain: