tjbrunetto

Hi Esoteric Team,

I am currently developing a platformer shot em up style game. The enemies look great and animate properly but when I add multiple enemies into the same area the frame rate seems to plunge and inconsistencies start to happen in regards to the way they are programmed.

Are any of you familier with the profiler in Unity and how to diagnose whether the performance issues would be caused from the spine editor versus my scripts?

Thanks

Tim
tjbrunetto
Posts: 42

Nate

The profiler should be pretty clear on where the time is being spent.

Are you loading the skeleton data beforehand?
User avatar
Nate

Nate
Posts: 8365

tjbrunetto

The way I have been grabbing the skeleton data is by creating a [Serializefield] SkeletonAnimation _skeletonAnimation. And then dragging in the inspector the skeletonanimation script. Afterwards I set the state of the animation during every attack calculation. I read the profiler and the collision detection i believe is the culprit as the physics 2d updates are sky high. I set up a lot of little bones as projectile catchers that use bounding boxes. The boudnign boxes use polygon colliders where are a lot more costly then say a box collider 2d. I am going to try to switch to all box colliders and see how much the collision detection suffers vs performance increases.

Tim

---

I just switched my entire skeleton off of polygon colliders to box colliders and capsule colliders to reduce the overhead cost of the physics updates overhead cost. The issue I have now is this error: ArgumentNullException: animation cannot be null. Parameter name: animation.

---

It seems that everytime I post about an issue I have I seem to solve it quickly. I moved the animation states from awake to start on the child object and it fixed the issue. It was working in awake before even though I do remember reading that animation states should be found in start as the object is typically not created in awake yet.

Tim

I have not changed anything in my code in regards to my animations so I am not sure what is happening here.
tjbrunetto
Posts: 42


Return to Unity