i am a very new beginner and i am trying to figure out this error’s
assets/SpawnObstacle expected insert a semicolon at the end
assets/SpawnObstacle unexpected token gameObject
assets/SpawnObstacle expected insert a semicolon at the end
assets/SpawnObstacle expection EOF found
this is my java script
using UnityEngine;
using System.Collections;
public class SpawnObstacle : MonoBehaviour {
public GameObject obstacle;
float x = 0;
void Update () {
float y = Random.Range(-6.766665f, -0.1744022f);
if(x < 1000) {
Instantiate(obstacle, new Vector3(x * 6.0f, y, 0),Quaternion.identity);
x++;
}
Debug.Log(x);
}
}