Get the component of each file in a Resources directory?

Is it possible to get a component of each prefab in a directory?

The below c# gets all the prefabs in a directory as Objects, but it seems they would need to be instantiated as Game Objects before the components can be accessed.


var MyObjects = Resources.LoadAll(“[MyDirNameWithinResources]”):

for (int i = 0; i < MyObjects.Length; i++)
{
[Get component of MyObjects*]*
}

Use the optional Type Filter parameter to only load those components you want.
Resources.LoadAll Scripting API