clone gameobject unity csharp

Code Example - clone gameobject unity csharp

                
                        public GameObject rootObj;

void Start()
{
    GameObject duplicate = Instantiate(rootObj);
}
                    
                
 

how to clone somthing unity

                        
                                public GameObject GameOjectYouWantToClone;

GameObject CloneOfGameOject = Instantiate(GameOjectYouWantToClone);
                            
                        
 

Related code examples