/// <summary>
/// Populates the prefab's or GameObject's object pool up to the specified count.
/// </summary>
/// <param name="objToPopulate">The prefab or GameObject to populate.</param>
/// <param name="amount">Number to populate with.</param>
public static void PopulatePoolWithObj(GameObject objToPopulate, int amount)
{
PoolableGameObject poolable = objToPopulate.GetComponent <PoolableGameObject>();
if (poolable == null)
{
Debug.LogErrorFormat(REQUIRES_COMP, objToPopulate.name, "PopulatePool");
return;
}
poolable.PopulatePool(amount);
}