I am starting with unity c# and I got this error
Assets/Scope.cs(39,15): error CS1002: ; expected
I can’t find it
this is my code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Scope : MonoBehaviour {
public Animator animator;
public GameObject scopeOverlay;
private bool isScoped = false;
void Update ()
{
if (Input.GetButtonDown(“Fire2”)) {
isScoped = !isScoped;
animator.SetBool(“Scoped”, isScoped);
scopeOverlay.SetActive(isScoped);
if (isScoped)
StartCoroutine(OnScoped());
else
OnUnscoped();
}
}
void OnUnscoped () {
scopeOverlay.SetActive(false);
}
IEnumerator OnScoped () {
yeild return new WaitForSeconds(.15f);
scopeOverlay.SetActive(true);
}
}