Unity5.X批清理AssetBundle的名称
来源:互联网 发布:python list函数 编辑:程序博客网 时间:2024/05/29 12:14
[MenuItem("Assets/平台打包/清理AssetBundle名字")] static public void ClearBundleFileName() { string path = Application.dataPath + "/Resources"; string[] files = System.IO.Directory.GetFiles( path, "*.*", SearchOption.AllDirectories); if( ( files != null ) && ( files.Length > 0 ) ) { for( int i = 0; i < files.Length; ++i ) { string fileName = files[ i ]; string localPath = AssetBunbleInfo.GetLocalPath(fileName); if( !string.IsNullOrEmpty( localPath ) ) { localPath = localPath.ToLower(); } if( AssetBundleBuild.FileIsResource( localPath ) ) { AssetImporter importer = AssetImporter.GetAtPath(localPath); if( importer != null ) { importer.assetBundleName = string.Empty; } } } } AssetDatabase.RemoveUnusedAssetBundleNames(); }
注意:localPath是Assets下的路径
比如:有个资源C://MyClinet/Assets/Resources/xxx.prefab。localPath就是:Assets/Resources/xxx.prefab
0 0
- Unity5.X批清理AssetBundle的名称
- Unity5.x AssetBundle 的变化
- Unity5.x AssetBundle 的变化
- unity5.X AssetBundle
- Unity5.X AssetBundle打包
- Unity5.X AssetBundle加载
- [Unity5.X]AssetBundle总结
- unity5.X AssetBundle使用(一 )
- unity5.X AssetBundle使用(二 )
- Unity5的AssetBundle
- 【Unity开发】Unity5.x版本的AssetBundle打包
- Unity5.x 编辑器中 获取所有标记的 AssetBundle 文件
- 关于Unity5.x版本AssetBundle打包Shader的问题
- Unity5.3.5的AssetBundle加载
- Unity5 AssetBundle的简单使用
- 介绍一下Unity5的AssetBundle
- Unity5的AssetBundle(一、打包)
- Unity5.X打包与加载AssetBundle
- PE 211
- hibernate入门
- 什么是SDK
- AlertDialog 加载自定义布局点击按钮消失的方法
- 大数据处理需要用到的编程语言开发语言
- Unity5.X批清理AssetBundle的名称
- iOS 如何对音频、视频合成,配音、卡拉OK技术
- scala进阶19-隐式转换内幕
- CF 9C水题
- UVA 11646 Athletics Track (简单数学题)
- 网站草图布局的设计思路SEO
- 前端的小玩意(9.4)——做一个仿360工具箱的web页面(自动生成所有图标,对图标添加响应逻辑)
- ACM做题思路总结
- 好东西Bootstrap