Hi, From Looking at the Profiler, the following code seem to generate 56B of Garbage
It seems to come from String related stuff.
Can anyone tell me why and how should I solve this?
THX
protected bool CompareBaseState(string stateName)
{
AnimatorStateInfo currentBaseState = anim.GetCurrentAnimatorStateInfo((int)MOTIONLAYER.BASE);
stateName = "Base." + stateName;
if(currentBaseState.nameHash == Animator.StringToHash(stateName)) { return true; }
return false;
}