public GameObject rootObj;
void Start()
{
GameObject duplicate = Instantiate(rootObj);
}
to make clone of any gameObject you can write this code:-
public GameObject myObject; //this is GameObjectThatYouWantToClone
GameObject Clone = Instantiate(myObject); // now your clone of that gameobject is stored in "Clone" gameObject
public GameObject GameOjectYouWantToClone;
GameObject CloneOfGameOject = Instantiate(GameOjectYouWantToClone);