How to instantiate a prefab as a child in Unity?
Turns out, that instantiating a prefab as a child is a pretty simple process. 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:
https://codeprozone.com/code/csharp/28533/unity-instantiate-prefab-as-child.html
1
vote
Ahmed Ali
shared this idea