How to CREATE a GameObject AS CHILD of ANOTHER GameObject in Unity

Опубликовано: 29 Октябрь 2024
на канале: GDT Solutions
2,247
17

In this video we see two ways to create GameObjects as child of another GameObject in Unity.
One way to do it is to use an overload of the Instantiate function (a function that you can be used in any script) that requires two parameters, the object you want to clone and the Transform component of the object you want to be the parent.
We also see how to directly assign the parent object if you have the reference of the GameObject you want to set as child.

Previous video: Create PREFABS AT RUNTIME in Unity
   • How to CREATE OBJECTS AT RUNTIME in U...  

____________________________________________________________
PORTFOLIO: https://gamedevtraum.com/en/portfolio...
CONTACT:   / gamedevtraum  
LINKEDIN:   / gamedevtraum  
DONATIONS
-You can download one of me free assets for Unity from my ITCH page and leave a donation
-You can donate with the THANKS button on every video
____________________________________________________________