Parent/Child relationship
Before we make our first prefab, a concept that is both useful and important is parentage. In our Hierarchy view, we can have GameObjects with other GameObjects attached to them in a Hierarchy. We call the primary objects as parents, and the secondary objects are called children. When these hierarchies exist, there are many benefits from an organizational standpoint as well as for practical application.
Where there is a series of objects connected together in such a manner, if something on the parent object is changed--such as being moved, rotated, or scaled--all the attached objects do the same in relation to the parent.
Parenting is something that also applies to prefabs. With that in mind, we will parent our objects ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access