Q:

Why isn't my resource loaded when calling Resources.FindObjectsOfTypeAll()

I have a method in my game that dynamically finds and instantiates prefabs into my scene like this
public void CreateAgent(string agentName)
{
   var prefabs = Resources.FindObjectsOfTypeAll<Agent>();
   var selectedPrefab = prefabs.Where(p => p.name == agentName).FirstOrDefault();
   Instantiate(selectedPrefab.gameObject);
}

This works sometimes, but it seems like sometimes the resource for my prefab hasn't been loaded, so Resources.FindObjectsOfTypeAll() doesn't return the resource that I want to load.  I can resolve that by calling Resources.LoadAll<Agent>("MyPrefabDirectory") first, but I'm not sure if doing that during gameplay will cause problems or slow the game down.  It also seems like Unity is unloading previously used resources, because I can load prefab A into my scene, then load a new scene, and when I try to load prefab A in the new scene, that results in prefab A not being found by Resources.FindObjectsOfTypeAll()
So my questions are 

Why do I have to call Resources.LoadAll() before Resources.FindObjectsOfType() will find my prefab?
Why is Unity unloading a previously loaded resource when I change scenes?
Is calling Resources.LoadAll<MyResourceType>() during gameplay bad?

A:

From the documentation
Resources.FindObjectsOfType():

This function can return any type of Unity object that is loaded.

Why is Unity unloading previously loaded resources? To save memory. If its not being used, its going to get garbage collected.
Considering that you're only going to be using one of the returned objects, you should probably refactor to just call Load on the single object you actually need.

