private static void FetchWorlds(int offset = 0)
{
ApiWorld.FetchList(
delegate(IEnumerable <ApiWorld> obj)
{
if (obj.FirstOrDefault() != null)
{
fetchingWorlds = EditorCoroutine.Start(() =>
{
var l = obj.ToList();
int count = l.Count;
SetupWorldData(l);
FetchWorlds(offset + count);
});
}
else
{
fetchingWorlds = null;
foreach (ApiWorld w in uploadedWorlds)
{
DownloadImage(w.id, w.thumbnailImageUrl);
}
}
},
delegate(string obj)
{
Debug.LogError("Error fetching your uploaded worlds:\n" + obj);
fetchingWorlds = null;
},
ApiWorld.SortHeading.Updated,
ApiWorld.SortOwnership.Mine,
ApiWorld.SortOrder.Descending,
offset,
PageLimit,
"",
null,
null,
null,
"",
ApiWorld.ReleaseStatus.All,
null,
null,
true,
false);
}