public void CheckDoneOnUpdate() { if (onUpdateTasks.Count == 0) { return; } foreach (var taskId in onUpdateTasks) { if (goTasks.ContainsKey(taskId)) { GoCallback task = goTasks[taskId]; if (!task.Canceled) { if (task.Asset != null) { DoInstant(taskId, task.Asset); } else { GameObject go = DoGetFromUnused(task.Path); task.Do(go); } } } } onUpdateTasks.Clear(); }
private void FinishInstant(ulong gcbId, GameObject go) { if (goTasks.ContainsKey(gcbId)) { GoCallback task = goTasks[gcbId]; task.Do(go); GoCallback.Remove(gcbId); goTasks.Remove(gcbId); } if (instanters.ContainsKey(gcbId)) { instanters.Remove(gcbId); } }