/// <summary> /// 执行数据加载任务 /// </summary> /// <param name="task_temp"></param> void excuteLoadTask(LoadTask task_temp) { if (task_temp.done_callback.GetType().Equals(typeof(Action <UnityWebRequest>))) { StartCoroutine(loadData(task_temp.path_or_Uri, (Action <UnityWebRequest>)task_temp.done_callback, task_temp.fail_callback)); } }
// Update is called once per frame void Update() { if (loadDataTask.Count > 0) { task_temp = loadDataTask.Dequeue(); excuteLoadTask(task_temp); } }