New to Unity, Error CS1061

Hello, I’m following the free CodeMonkey tutorial and I’ve gotten to the part where I’m supposed to set up going from idle animation to walking animation. I have the condition set up as “IsWalking” and both have there “has exit time” disabled and the conditions set up for IsWalking true, and IsWalking false. I have the code set up for public bool IsWalking() in my Player class, but in my PlayerAnimator class when I try to reference it inside the update function in animator.SetBool, I have “IsWalking” as the string, and player.IsWalking as my boolean. I have created a serialized private Player player object which has a reference to my game component in the heirarchy. And I have created a private Animator animator yet I’m getting the error CS1061. Not sure what I should post picture wise so if any more info is needed please let me know.

Here’s my code if this is helpful at all. Apologies if any of it is confusing.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player : MonoBehaviour {

[SerializeField] private float moveSpeed = 7f;

private bool isWalking;

private void Update() {
Vector2 inputVector = new Vector2(0, 0);

if (Input.GetKey(KeyCode.W)) {
inputVector.y = +1;
}
if (Input.GetKey(KeyCode.S)) {
inputVector.y = -1;
}
if (Input.GetKey(KeyCode.A)) {
inputVector.x = -1;
}
if (Input.GetKey(KeyCode.D)) {
inputVector.x = 1;
}

inputVector = inputVector.normalized;

Vector3 moveDir = new Vector3(inputVector.x, 0f, inputVector.y);
transform.position += moveDir * moveSpeed * Time.deltaTime;

isWalking = moveDir != Vector3.zero;

float rotateSpeed = 10f;
transform.forward = Vector3.Slerp(transform.forward, moveDir, Time.deltaTime * rotateSpeed);
}

public bool IsWalking() {
return isWalking;
}

}

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerAnimator : MonoBehaviour {

private const string IS_WALKING = “IsWalking”;

[SerializeField] private Player player;

private Animator animator;

private void Awake() {
animator = GetComponent();
}

private void Update() {

animator.SetBool(IS_WALKING, player.IsWalking());

}
}

The code compiles. Are you sure you posted the right code?
Also are you sure you don’t have another “Player” class somewhere in your project?

Ahah you’re a genius, I had named my animator screen Player for whatever reason, a quick rename over to MyPlayerAnimator, and the error is gone and the animation works, thank you so much