I’m having trouble with error “CS8025 C# Feature is not available in C# 4. Please use language version 7 or greater.”
This is my script and bold ones are in trouble.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FireCtrl : MonoBehaviour {
public GameObject bullet;
public Transform firePos;
// Update is called once per frame
void Update () {
if (Input.GetMouseButtonDown(0))
{
Fire();
}
void **Fire()**
{
CreateBullet();
}
void **CreateBullet()**
{
Instantiate(bullet, firePos.position, firePos.rotation);
}
}
}
I’ve tried to change language version by going through properties - build - advanced, but properties window doesn’t open.
I installed visual studio yesterday and I can’t understand why there’s a language version problem.
Please help me.