private void BuildSkeleton(Transform root)
        {
            var position = root.position;

            root.position = Vector3.zero;

            try
            {
                // hips -> spine -> chest
                var builder = new SkeletonBuilder(root);
                builder.AddHips(0.8f, 0.2f);
                builder.AddSpine(0.1f);
                builder.AddChest(0.2f);
                builder.AddNeck(0.1f);
                builder.AddHead(0.2f);
                builder.AddArm(0.1f, 0.3f, 0.3f, 0.1f);
                builder.AddLeg(0.1f, 0.3f, 0.4f, 0.1f, 0.1f);

                var description = AvatarDescription.Create(builder.Skeleton);
                var animator    = GetComponent <Animator>();
                animator.avatar = description.CreateAvatar(root);

                // create SkinnedMesh for bone visualize
                var renderer = SkeletonMeshUtility.CreateRenderer(animator);

                if (m_material == null)
                {
                    m_material = new Material(Shader.Find("Standard"));
                }
                renderer.sharedMaterial = m_material;
                //root.gameObject.AddComponent<BoneMapping>();

                var transfer = GetComponent <HumanPoseTransfer>();
                if (transfer != null)
                {
                    transfer.Avatar = animator.avatar;
                    transfer.Setup();
                }
            }
            finally
            {
                // restore position
                root.position = position;
            }
        }