- Home /
Question by
Snakeyboy · Jun 01, 2010 at 05:43 PM ·
instantiateprefab
Instantiating a prefab wont work
Instantiate("FPC",respawnpoint.transform.position, Quaternion.identity);
this code wont work and no matter how much i have searched i havent found a solution , i want to instantiate an object in the transform of another object and this line here has an error : No appropriate version of 'UnityEngine.Object.Instantiate' for the argument list '(String, UnityEngine.Vector3, UnityEngine.Quaternion)' was found.
is there any other way i can do the same thing?
Comment
Why was this voted down? It's not a duplicate, not a request to write his entire program...
Best Answer
Answer by Eric5h5 · Jun 01, 2010 at 06:12 PM
You can't instantiate a string, you have to instantiate an object.
var go : GameObject;
...
Instantiate(go);