void LoadFromResources() { if (info != null) { string resourcePath = Path.Combine(Path.GetDirectoryName(info.fullName), Path.GetFileNameWithoutExtension(info.fullName)); resourcePath = AssetPaths.RemoveAssetPrev(resourcePath); m_Request = RequestManager.CreateResouceLoaderRequest(resourcePath, type); m_Request.onComplete += OnRequestComplete; assetManager.requestManager.ActiveRequest(m_Request); } else { Error(); Debug.LogError("[AssetManage]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 { Debug.LogError("[AssetManage]Load Asset with no info"); Error(); } }