
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
캐릭터 움직이는 강의 영상을 보고 플레이 모드로 캐릭터를 움직여보려 하는데 움직이지 않습니다.
캐릭터 인스펙터 창과 PlayerMovement 스크립트 내용을 첨부하여 드리니
도움 주실 수 있으시면 감사하겠습니다.
더불어 해당 스크립트의 13번째 줄 관련하여 경고 메세지가 뜨는데
설명 내용이 이해가 가지 않아서 이것도 어떻게 하면 해결할 수 있는지 알려주시길 부탁드립니다.

작성한 코드 및 에러 메세지
[PlaverMovement script 내용]
// 사실 public이 아니더라도 SerializeField를 적용하면 인스펙터창에서 볼 수 있습니다.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
[SerializeField] private float movementSpeed;
private float inputX, inputZ;
private bool jumpPressed;
private Rigidbody rigidbody;
// Start is called before the first frame update
private void Start()
{
rigidbody = GetComponent<Rigidbody>();
}
private void Update()
{
GetInput();
Move();
}
private void GetInput()
{
inputX = Input.GetAxis("Horizontal");
inputZ = Input.GetAxis("Vertical");
// 화면을 클릭해도 점프가 되고 스페이스바를 눌러도 됨
jumpPressed = Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButtonDown(0);
}
void Move()
{
// 캐릭터 기준으로 앞과 오른쪽을 바라보게 해요!
var forward = transform.forward;
var right = transform.right;
// 캐릭터가 위로 걸어가지 않도록 y를 0으로 만들어줘요.
forward.y = 0f;
right.y = 0f;
// rigidbody.velocity를 통해 오브젝트가 어떤 방향으로 움직일 지를 적용합니다.
Vector3 moveDirection = (forward * inputZ + right * inputX) * movementSpeed;
moveDirection.y = rigidbody.velocity.y;
rigidbody.velocity = moveDirection;
//applyMovementAnimationStatus();
// 캐릭터를 회전시킵니다.
transform.Rotate(Vector3.up * Input.GetAxis("Mouse X") * 90f * Time.deltaTime);
}
}
