public static string AssetBundleUrl2Name(string url) { string retName = null; string parren = FilePath.StreamingAssetsPath + "AssetBundles/" + PlatformUtil.GetPlatformName() + "/"; retName = url.Replace(parren, ""); parren = FilePath.PersistentDataPath + "AssetBundles/" + PlatformUtil.GetPlatformName() + "/"; retName = retName.Replace(parren, ""); return(retName); }
public static string AssetBundleName2Url(string name) { string retUrl = FilePath.PersistentDataPath + "AssetBundles/" + PlatformUtil.GetPlatformName() + "/" + name; if (File.Exists(retUrl)) { return(retUrl); } return(FilePath.StreamingAssetsPath + "AssetBundles/" + PlatformUtil.GetPlatformName() + "/" + name); }
public static string GetPlatformName() { return(PlatformUtil.GetPlatformForAssetBundles(EditorUserBuildSettings.activeBuildTarget)); }