soo I wrote a script that I saw on youtube by a channel called Jackson Academy and when I finished writing it, unity gave me a warning/error message “the referenced script (Unknown) on this Behaviour is missing”, I tried out all the answers and nothing worked… here’s my code:
public class PlayerController : MonoBehaviour
{
public Rigidbody2D rb;
public float movementSpeed;
public float jumpHeight;
private bool grounded;
public Transform groundCheck;
public LayerMask groundLayer;
private void Update()
{
grounded = Physics2D.OverlapCircle(groundCheck.position, .2f, groundLayer);
rb.velocity = new Vector2(Input.GetAxis("Horizontal") * movementSpeed * Time.deltaTime, rb.velocity.y);
}
}
and here’s the warning:
PLEASE HELP!!!