Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public static string GetPlatformName()
 {
     return(PlatformUtil.GetPlatformForAssetBundles(EditorUserBuildSettings.activeBuildTarget));
 }