Ejemplo n.º 1
0
 void LoadFromResources()
 {
     if (info != null)
     {
         string resourcePath = Path.Combine(Path.GetDirectoryName(info.fullName), Path.GetFileNameWithoutExtension(info.fullName));
         resourcePath = AssetPaths.RemoveAssetPrev(resourcePath);
         Request request = RequestManager.CreateResouceLoaderRequest(resourcePath, type);
         request.onComplete += OnRequestComplete;
         assetManager.requestManager.ActiveRequest(request);
     }
     else
     {
         Error();
         Debug.LogError("Load Asset with no info");
     }
 }
Ejemplo n.º 2
0
 void LoadFromResources()
 {
     if (info != null)
     {
         string resourcePath = Path.Combine(Path.GetDirectoryName(info.fullName), Path.GetFileNameWithoutExtension(info.fullName));
         resourcePath = AssetPaths.RemoveAssetPrev(resourcePath);
         if (type == null)
         {
             asset = Resources.Load(resourcePath);
         }
         else
         {
             asset = Resources.Load(resourcePath, type);
         }
         Complete();
     }
     else
     {
         Error();
         Debug.LogError("Load Asset with no info");
     }
 }