Retrieving All game object of certain type

Hello,

Is there some function in unity that retrieves to me all prefabs, in the assets, no matter in what subfolder they are. I figured since the EditorGUILayout.ObjectField does it, there should be some prebuilt function that does it.

Edit: I forgot to mention that I wanted to retrieve it by code, something similar to Resources.FindObjectsOfTypeAll(typeof(GameObject)) as GameObject[];
but that only returns prefabs on the project folder instead of returning all gameobject in the scene, in the folders, and even some default prefabs unity has.

Yes There is.

In your projects tab, there is a favourites button.
Press the triangle beside to uncollapse the other menus.

Select Prefabs.