Exemplo n.º 1
0
        public void OnPreprocessBuild(BuildTarget target, string path)
        {
            BuildScript.CopyAssetBundlesTo(Path.Combine(Application.streamingAssetsPath, Assets.AssetBundles));
            var platformName = BuildScript.GetPlatformName();
            var searchPath   = Path.Combine(Path.Combine(Application.streamingAssetsPath, Assets.AssetBundles),
                                            platformName);

            if (!Directory.Exists(searchPath))
            {
                return;
            }
            var files = Directory.GetFiles(searchPath, "*.manifest", SearchOption.AllDirectories);

            foreach (var file in files)
            {
                var info = new FileInfo(file);
                if (info.Exists)
                {
                    info.Delete();
                }
            }

            files = Directory.GetFiles(searchPath, "*.meta", SearchOption.AllDirectories);
            foreach (var item in files)
            {
                var info = new FileInfo(item);
                info.Delete();
            }
        }
Exemplo n.º 2
0
        public void OnPreprocessBuild(BuildTarget target, string path)
        {
            var destination = Path.Combine(Application.streamingAssetsPath, Assets.AssetBundles);

            if (Directory.Exists(destination))
            {
                FileUtil.DeleteFileOrDirectory(destination);
            }
            var settings = BuildScript.GetSettings();

            if (settings.copyToStreamingAssets)
            {
                BuildScript.CopyAssetBundlesTo(Application.streamingAssetsPath);
            }
        }
Exemplo n.º 3
0
 private static void CopyAssetBundles()
 {
     BuildScript.CopyAssetBundlesTo(Application.streamingAssetsPath);
 }
Exemplo n.º 4
0
 private static void CopyAssetBundles()
 {
     BuildScript.CopyAssetBundlesTo(Application.streamingAssetsPath);
     Log.Print("Successfully copied asset bundles into streaming assets");
 }
Exemplo n.º 5
0
 private static void CopyAssetBundles()
 {
     BuildScript.CopyAssetBundlesTo(Path.Combine(Application.streamingAssetsPath, Assets.AssetBundles));
     AssetDatabase.Refresh();
 }