Ejemplo n.º 1
0
        private static void CopyAssetBundlesTo(string outputPath)
        {
            // Clear streaming assets folder.
            FileUtil.DeleteFileOrDirectory(Application.streamingAssetsPath);
            Directory.CreateDirectory(outputPath);
            var outputFolder = AssetUtility.GetPlatformName();

            // Setup the source folder for assetbundles.
            var source = Path.Combine(Path.Combine(Environment.CurrentDirectory, AssetUtility.AssetBundlesOutputPath),
                                      outputFolder);

            if (!Directory.Exists(source))
            {
                Debug.Log("No assetBundle output folder, try to build the assetBundles first.");
            }

            // Setup the destination folder for assetbundles.
            var destination = Path.Combine(outputPath, outputFolder);

            if (Directory.Exists(destination))
            {
                FileUtil.DeleteFileOrDirectory(destination);
            }
            FileUtil.CopyFileOrDirectory(source, destination);
        }
Ejemplo n.º 2
0
        private static string GetAssetBundleManifestFilePath()
        {
            var relativeAssetBundlesOutputPathForPlatform = Path.Combine(AssetUtility.AssetBundlesOutputPath,
                                                                         AssetUtility.GetPlatformName());

            return(Path.Combine(relativeAssetBundlesOutputPathForPlatform, AssetUtility.GetPlatformName()) + ".manifest");
        }
Ejemplo n.º 3
0
        public static string CreateAssetBundleDirectory()
        {
            // Choose the output path according to the build target.
            var outputPath = Path.Combine(AssetUtility.AssetBundlesOutputPath, AssetUtility.GetPlatformName());

            if (!Directory.Exists(outputPath))
            {
                Directory.CreateDirectory(outputPath);
            }
            return(outputPath);
        }