unity get all components in gameobject

Code Example - unity get all components in gameobject

                
                        GetComponents<Component>()
                    
                
 

unity get all gameobjects

                        
                                //Get's all gameobjects and puts it in a list called "GameobjectList"
Object[] GameobjectList = Resources.FindObjectsOfTypeAll(typeof(GameObject));
                            
                        
 

Related code examples