Exemplo n.º 1
0
 private static void OnLoadError(BaseLoaderElement loader)
 {
     Debug.Log("resource load error: " + loader.Path);
     _loadingDic.Remove(loader.Path);
     if (loader.errorCallback != null)
     {
         loader.errorCallback.Invoke(loader.Path);
     }
     loader.Unload();
 }
Exemplo n.º 2
0
 public static void Unload(string path, System.Action <object> completeCallback, System.Action <string> errorCallback = null)
 {
     if (path == null)
     {
         return;
     }
     if (_loadingDic.ContainsKey(path))
     {
         BaseLoaderElement loader = _loadingDic[path];
         loader.completeCallback -= completeCallback;
         loader.errorCallback    -= errorCallback;
         if (loader.completeCallback == null)
         {
             _loadingDic.Remove(path);
             loader.Unload();
             //TestCollider.Instance.StopCoroutine("Load");
         }
     }
 }
Exemplo n.º 3
0
 private static void OnLoadComplete(BaseLoaderElement loader)
 {
     _loadingDic.Remove(loader.Path);
     loader.completeCallback.Invoke(loader.GetContent());
     loader.Unload();
 }