Unity5 打assetbundle时,无法打成图集仍然是散图的原因
2024-09-01 06:42:22
首先需要把 SpritePacker设置成可用
菜单Edit->project setting->editor 修改为可用
然后,保证所有图片的导入格式如下
最主要是 packing tag要设置, 相同值的图片会合成一个图集
可以用代码设置
string[] sprites = new string[]{
"Assets/atlas/textures/t1.png",
"Assets/atlas/textures/t2.png",
"Assets/atlas/textures/t3.png",
}; string ab_atlas1 = "ab_atlas1"; for (int i = ; i < sprites.Length; i++)
{
TextureImporter textureImporter1 = AssetImporter.GetAtPath (sprites [i]) as TextureImporter;
textureImporter1.textureType = TextureImporterType.Sprite;
textureImporter1.spritePackingTag = ab_atlas1;
textureImporter1.spriteImportMode = SpriteImportMode.Single;
textureImporter1.SaveAndReimport ();
}
之后按正常打包即可, 另外注意,如果packingtag相同而abname不同,将打到不同的包里。
最新文章
- [LeetCode] Count Univalue Subtrees 计数相同值子树的个数
- WPF中UserControl和DataTemplate
- 在VS 2012 配置SDL
- CSS中的浮动和定位
- AlwaysOn可用组基础知识
- Ubuntu安装图形桌面
- 通知角标(2)只用一个TextView实现
- Linux下/etc/fstab文件详解
- 长平狐 Cocos2d-x 的“HelloWorld” 深入分析
- 在SrollView中嵌套GridView或ListView(转)
- Java Primitives and Bits
- Web云笔记--CSS
- JDFS:一款分布式文件管理系统,第五篇(整体架构描述)
- [四]基础数据概述之Byte详解
- [20190402]对比_mutex_wait_scheme不同模式cpu消耗.txt
- winform程序读取和改写配置文件App.config元素的值
- php设计模式-依赖注入模式(Dependency Injection)
- 8、JPA-映射-双向一对一
- iOS - iphoneX系列 - 全局配置的基本信息
- 安装Memcache的PHP扩展
热门文章
- 视音频编解码学习工程:FLV封装格式分析器
- 简约才是王道? CardView 的使用
- 阿里云服务器实战(二): Linux MySql5.6数据库乱码问题
- OC第一天——面向对象
- Ext.Net_1.X_WINDOW遮罩层被GridPanel挡住
- 【一天一道LeetCode】#23. Merge k Sorted Lists
- JS跨域请求
- ";《算法导论》之‘线性表’";:基于静态分配的数组的顺序表
- Android特效专辑(六)——仿QQ聊天撒花特效,无形装逼,最为致命
- obj-c编程15[Cocoa实例03]:MVC以及归档化示例