/// <summary> /// 获取文件的完整路径 /// </summary> public string FullPathForFile(string file, ResourceType resType) { string fullPath; if (resType == ResourceType.AssetBundle) { file = _assetBundleMgr.GetAssetBundleNameByAssetPath(file); } if (!_resourceMgr.ResourcesLoadMode) { file = file.ToLower(); fullPath = OUTER_FILE_SYMBOL + ResourceLoadPath + file; //暂时直接读streaming中bundle文件(后期做bundle压缩的时候再换) //fullPath = FILE_SYMBOL + StreamingAssetsPath + file; } else { //如果是resource模式加载,移除后缀 int index = file.LastIndexOf("."); if (index > -1) { file = file.Substring(0, index); } fullPath = file; } return(fullPath); }
private string[] GetDependResPath(Resource res) { string resName = _assetBundleMgr.GetAssetBundleNameByAssetPath(res.path); return(_assetBundleMgr.GetDirectDependencies(resName)); }