UnityEngine.HumanPoseHandler.HumanPoseHandler C# (CSharp) Method

HumanPoseHandler() public method

Creates a human pose handler from an avatar and a root transform.

public HumanPoseHandler ( Avatar avatar, Transform root ) : System
avatar Avatar The avatar that defines the humanoid rig on skeleton hierarchy with root as the top most parent.
root Transform The top most node of the skeleton hierarchy defined in humanoid avatar.
return System
        public HumanPoseHandler(Avatar avatar, Transform root)
        {
            if (root == null)
            {
                throw new ArgumentNullException("HumanPoseHandler root Transform is null");
            }
            if (avatar == null)
            {
                throw new ArgumentNullException("HumanPoseHandler avatar is null");
            }
            if (!avatar.isValid)
            {
                throw new ArgumentException("HumanPoseHandler avatar is invalid");
            }
            if (!avatar.isHuman)
            {
                throw new ArgumentException("HumanPoseHandler avatar is not human");
            }
            this.Internal_HumanPoseHandler(avatar, root);
        }