Jim Cheng
Jim Cheng

Reputation: 63

How to Optimize Animation.Sample

I'm trying to optimize the animation. As I see in profiler, about 20% of my CPU used for 'Animation.Sample'. Is there any way to reduce the sampling accuracy to gain performance.

Upvotes: 1

Views: 986

Answers (1)

axwcode
axwcode

Reputation: 7824

Unless you want to write your own animation system for Unity, which would be probably slower due to Unity's optimizations. You can't do anything about it except tweaking the animation yourself.

  • Use fewer bones
  • Remove redundant curves
  • Ensure that any bones that have colliders attached also have rigidbodies.

Upvotes: 2

Related Questions