private void Awake() {
Camera = Camera.main ?? Camera.allCameras[0];
_moveDirection = transform.TransformDirection(Vector3.forward);
_animation = GetComponent<Animation>();
if (!_animation) {
Debug.Log("The character you would like to control doesn't have animations. Moving her might look weird.");
}
if (!idleAnimation) {
_animation = null;
Debug.Log("No idle animation found. Turning off animations.");
}
if (!walkAnimation) {
_animation = null;
Debug.Log("No walk animation found. Turning off animations.");
}
if (!runAnimation) {
_animation = null;
Debug.Log("No run animation found. Turning off animations.");
}
if (!jumpPoseAnimation && CanJump) {
_animation = null;
Debug.Log("No jump animation found and the character has canJump enabled. Turning off animations.");
}
}