i watched a tutorial. hes making a reference for PlayerMovement. its not working pls help.
private Animator anim;
private PlayerMovement playerMovement;
heere the “PlayerMovement” shows an error. how to fix?
i watched a tutorial. hes making a reference for PlayerMovement. its not working pls help.
private Animator anim;
private PlayerMovement playerMovement;
heere the “PlayerMovement” shows an error. how to fix?
using UnityEngine;
public class PlayerAttack : MonoBehaviour
{
[SerializeField] private float attackCooldown;
private Animator Animator;
private PlayerMovement playerAttack;
private void Awake()
{
Animator = GetComponent<Animator>();
}
}
this is how much ive made till yet. It wasnt working so I stopped. Its working for the guy in the tutorial tho
You didn’t provide PlayerMovement
class. I guess, you don’t have it.
So, the error is correct.
how do i fix it
the guy in the tutorial doesnt have it either, but it works for him
At the start of the tutorial, he provides 2 links for GutHub with needed staff. Use it.
So, for example, this is your class.
oh okay thank you so much