instantiate object inside of object Unity

Code Example - instantiate object inside of object Unity

                
                        // 1. create game object
// 2. set its transform.parent property
GameObject child = GameObject.Instantiate(MyPrefab);
child.transform.parent = this.gameObject.transform; //or whatever gameobj will be its parent