creating an instance from a prefab at runtime

hi, i have a prefab in my unity project folder called "Sphere" (in the root folder). how do i instantiate that prefab at runtime from within a script? thanks, flexrails

The way to do that is to create a variable in your script containing the gameObject you want to create, then you call Instantiate (myPrefab,myPosition,myRotation) to make a clone of it to appear in the scene at a specified position and rotation. Take a look at the scripting reference on "Instantiate" for more examples.

If you want to create objects that arent bound design-time, then you have to put the objects in a folder you call "Resources", and load that runtime though Resources.Load.