Kinect.AvatarController.Awake C# (CSharp) Method

Awake() public method

public Awake ( ) : void
return void
        public void Awake()
        {
            // check for double start
            if (bones != null)
                return;
            if (!gameObject.activeInHierarchy)
                return;

            // Set model's arms to be in T-pose, if needed
            //SetModelArmsInTpose();

            // inits the bones array
            bones = new Transform[27];

            // Initial rotations and directions of the bones.
            initialRotations = new Quaternion[bones.Length];

            // Map bones to the points the Kinect tracks
            MapBones();

            // Get initial bone rotations
            GetInitialRotations();

            // if parent transform uses physics
            isRigidBody = gameObject.GetComponent<Rigidbody>();
        }