Game Development Reference
In-Depth Information
Unity Prefabs and
Instantiation
Prefabs
If you come from a long Maya lineage, you are undoubtedly familiar with
the concept of instances. An instance in most of the 3D world is the idea of
simply displaying an object multiple times rather than having multiple copies
of the object. In applications like Maya, this means that if I made a change
to the original object (candle modeled onto the cupcake), the change is
automatically made to every instance of that object (500 instances of the
cupcake suddenly all automatically have candles).
In Unity, this same idea is present, but uses slightly different nomenclature.
In Unity this idea of displaying an object multiple times and having those
additionally displayed versions inherit changes is called prefabs. We've
talked of these before, but when constructing a game these can be
tremendously powerful, and changes can be quickly propagated through
the model. Of special use for us is the ability to add functionality to an
object and have the prefabs throughout the model instantly inherit that
capability.
Search WWH ::




Custom Search