public GameObject PullObject(string name, string fallback = "")
{
if (name == fallback)
fallback = string.Empty;
foreach (GameObject obj in networkInstantiates)
if (obj.name == name)
return obj;
GameObject find = Resources.Load<GameObject>(resourcesDirectory + "/" + name);
if (find == null)
{
if (!string.IsNullOrEmpty(fallback))
return PullObject(fallback);
else
Debug.LogError("GameObject with name " + name + " was not found in the lookup. Make sure the object is in the resources folder or in the Networking Manager \"Network Instantiates\" array in the inspector.");
}
return find;
}