get all components of type unity

Code Example - get all components of type unity

                
                        BaseClass[] components = GameObject.FindObjectsOfType<BaseClass>();