how to clone somthing unity

Code Example - how to clone somthing unity

                
                        public GameObject GameOjectYouWantToClone;

GameObject CloneOfGameOject = Instantiate(GameOjectYouWantToClone);
                    
                
 

clone gameobject unity csharp

                        
                                public GameObject rootObj;

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

Related code examples