Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

I have a error that i can figure out about spawning game object

$
0
0
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); } }![alt text][1] ![alt text][2] [1]: /storage/temp/21924-capture.png [2]: /storage/temp/21925-capture1.png

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>