うにてぃブログ

主にUnityとC#に関する記事を書いていきます

CustomYieldInstruction

【Unity】UnityEngine.CustomYieldInstruction の GC

気になったので計測 WaitUntil と WaitWhile は white() に置き換えたほうがいいかもしれない WaitForSeconds 20 B WaitUntil 136 B WaitWhile 136 B WaitForFixedUpdate 16 B WaitForSecondsRealtime 24 B WaitForEndOfFrame 16 B

【Unity】Animatior の再生を待つ

この記事は、Animator に セットしてる Animation が一つのみを想定している AnimationStateInfo.IsName Animation の名前が分かっていた場合は IsName で待つことができます private IEnumerator WaitAnimationImpl() { var animator = gameObject.GetCompo…