1 (edited by gihaha4980 2022-07-15 08:10:19)

Topic: cHow to instantiate a prefab as a child in Unity?

You just need the Instantiate function and a few variables to track its parent and position. In Unity to spawn a prefab as a child of another object you just need to assign it to the desired parent object. Here's an example of how to do this, with a sample cube prefab:

2 (edited by KevinKK 2023-05-09 10:06:07)

Re: cHow to instantiate a prefab as a child in Unity?

A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for.Thanks for such post and please keep it up.DGME Employee

3 (edited by shimajad.id.i13425 2022-09-13 04:34:54)

Re: cHow to instantiate a prefab as a child in Unity?

Thanks for the info I will try to figure it out for more. https://www.dunkinrunsonyou.biz/

Re: cHow to instantiate a prefab as a child in Unity?

if we click our ‘Instantiate Prefab’ button we see that our triangle spawns directly to the center of the world. Since we did not specify a parent or position it automatically goes to position (0,0).  KohlsFeedback.com