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"); } }
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"); } }