Ejemplo n.º 1
0
        public static string AssetBundlePathToAssetBundleName(string assetBundlePath)
        {
            if (!string.IsNullOrEmpty(assetBundlePath))
            {
                if (AssetPackageUtil.IsAssetsPackagePath(assetBundlePath))
                {
                    assetBundlePath = AssetPackageUtil.AssetsPathToAssetsPackagePath(assetBundlePath);
                }
                //no " "
                assetBundlePath = assetBundlePath.Replace(StringConst.String_Space, StringConst.String_Empty);
                //there should not be any '.' in the assetbundle name
                //otherwise the variant handling in client may go wrong
                assetBundlePath = assetBundlePath.Replace(StringConst.String_Dot, StringConst.String_Underline);
                //add after suffix ".assetbundle" to the end
                assetBundlePath = assetBundlePath + BuildConst.AssetBundle_Suffix;
                return(assetBundlePath.ToLower());
            }

            return(null);
        }
Ejemplo n.º 2
0
 public AssetPathMap()
 {
     assetPath       = AssetPackageUtil.AssetsPackagePathToAssetsPath(BuildConst.AssetPathMap_File_Name);
     assetBundleName = AssetBundleUtil.AssetBundlePathToAssetBundleName(assetPath);
 }