这个在每帧的都赋值的时候:
private void SetAnimationIdleClip()
{
m_overrideController["Idle"] = clip;
}
则会出现上面的消耗,这里就要保证只赋值一次就可以了:
private void SetAnimationIdleClip()
{
if(m_overrideController["Idle"] != clip) //assign only when clip is different
{
m_overrideController["Idle"] = clip;
}
}