IEnumerator LoadResourceAll(List<string> allResName, OnResourcesLoadedCallback callBackOn, BeforeResourcesLoadedCallback callBackBefore, AfterResourcesLoadedCallback callBackAfter) { if (callBackBefore != null) callBackBefore(); for (int i = 0; i < allResName.Count; i++) yield return StartCoroutine(LoadResource(allResName[i], callBackOn)); if (callBackBefore != null) callBackBefore(); }
public void StartLoadResources(List<string> allResName, OnResourcesLoadedCallback callBackOn, BeforeResourcesLoadedCallback callBackBefore, AfterResourcesLoadedCallback callBackAfter) { StartCoroutine(LoadResourceAll(allResName, callBackOn, callBackBefore, callBackAfter)); }