CS1002

What is happening,Unity say that I’ve got an error CS1002

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

public class Player : MonoBehaviour
{
private Animator animator;

// Start is called before the first frame update
void Start()
{
animator = GetComponent();
}

// Update is called once per frame
void Update()
{
if (Input.GetKey(KeyCode.W))
{
animator.SetBool(“IsHeWalkingLeft”, true);
}

}
}

There are no compile errors in the code you shared. Check the following:

  • Make sure the name of the file in the error is the same as the one you’ve shared here
  • Make sure you have saved any changes to the file in your code editor
  • Make sure the preview of the code in the bottom right corner of Unity looks the same as the code looks in your code editor.

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

Please use code tags: https://discussions.unity.com/t/481379