- Home /
Question by
AlienClubrider · Aug 11, 2013 at 06:06 AM ·
instantiateprefabspawn
How do you instantiate just one prefab?
I just want to instantiate one prefab. Every time use var cube1 = Instantiate(CubePrefab,GameObject.Find("SpawnPoint").transform.position,Quaternion.identity); and it spawn to many I want to shorten it to one.
Comment
Answer by cdrandin · Aug 11, 2013 at 06:19 AM
If you put it in your Start function it will only create the object once. If you put in Update, Update is constantly called every frame.
Your answer
Follow this Question
Related Questions
Don't allow prefab to spawn if prefab already exists at the spawn location. 1 Answer
Instantiate Prefab 0 Answers
Spawning Objects Using An Array. 1 Answer
How to force a variable to prefab 1 Answer