private void SetupAnimationProperties() { SampleBoid.SetActive(true); boidSkinnedMeshRenderer = SampleBoid.GetComponentInChildren <SkinnedMeshRenderer>(); boidAnimator = SampleBoid.GetComponentInChildren <Animator>(); boidAnimator.cullingMode = AnimatorCullingMode.AlwaysAnimate; animationBuffer = boidSkinnedMeshRenderer.CreateSkinnedAnimationComputeBuffer(boidAnimator, BoidAnimationClip, out framesCount); MaterialsList.ForEach(material => { material.SetBuffer(AnimationBufferName, animationBuffer); material.SetInt("FramesCount", framesCount); if (FrameInterpolation) { material.EnableKeyword("FRAME_INTERPOLATION"); } else { material.DisableKeyword("FRAME_INTERPOLATION"); } }); isFrameInterpolationEnabled = FrameInterpolation; SampleBoid.SetActive(false); }