Game Development Reference
In-Depth Information
Figure 7-28. The instantiated zombie bunny
Investigating Instantiation
Many functions can be “overloaded,” that is they can take different arguments. When you use the
Instantiate function with only the prefab to be instantiated in it, it will use the transform stored on the
prefab to position and orient it. But this function can also set the new object at a specified location
and orientation.
Do a search for GameObject.Instantiate in the Scripting Reference.
You will see that it shows both argument options or overloads (Figure 7-29 ).
 
Search WWH ::




Custom Search