首先需要把 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不同,将打到不同的包里。

  

最新文章

  1. [LeetCode] Count Univalue Subtrees 计数相同值子树的个数
  2. WPF中UserControl和DataTemplate
  3. 在VS 2012 配置SDL
  4. CSS中的浮动和定位
  5. AlwaysOn可用组基础知识
  6. Ubuntu安装图形桌面
  7. 通知角标(2)只用一个TextView实现
  8. Linux下/etc/fstab文件详解
  9. 长平狐 Cocos2d-x 的“HelloWorld” 深入分析
  10. 在SrollView中嵌套GridView或ListView(转)
  11. Java Primitives and Bits
  12. Web云笔记--CSS
  13. JDFS:一款分布式文件管理系统,第五篇(整体架构描述)
  14. [四]基础数据概述之Byte详解
  15. [20190402]对比_mutex_wait_scheme不同模式cpu消耗.txt
  16. winform程序读取和改写配置文件App.config元素的值
  17. php设计模式-依赖注入模式(Dependency Injection)
  18. 8、JPA-映射-双向一对一
  19. iOS - iphoneX系列 - 全局配置的基本信息
  20. 安装Memcache的PHP扩展

热门文章

  1. 视音频编解码学习工程:FLV封装格式分析器
  2. 简约才是王道? CardView 的使用
  3. 阿里云服务器实战(二): Linux MySql5.6数据库乱码问题
  4. OC第一天——面向对象
  5. Ext.Net_1.X_WINDOW遮罩层被GridPanel挡住
  6. 【一天一道LeetCode】#23. Merge k Sorted Lists
  7. JS跨域请求
  8. &quot;《算法导论》之‘线性表’&quot;:基于静态分配的数组的顺序表
  9. Android特效专辑(六)——仿QQ聊天撒花特效,无形装逼,最为致命
  10. obj-c编程15[Cocoa实例03]:MVC以及归档化示例