First, you need to set the Spritepacker to be available
Menu Edit->project Setting->editor modified to be available
Then, ensure that all pictures are imported in the following format:
The main is packing tag to set, the same value of the picture will be synthesized an atlas
Can be set in code
1 2 string[] Sprites =New string[]{ 3 "Assets/atlas/textures/t1.png",4 "Assets/atlas/textures/t2.png",5 "Assets/atlas/textures/t3.png",6 };7 8 stringAB_ATLAS1 ="AB_ATLAS1";9 Ten for(inti =0; I < Sprites. Length; i++) One { ATextureimporter textureImporter1 = Assetimporter.getatpath (sprites [i]) asTextureimporter; -Textureimporter1.texturetype =Textureimportertype.sprite; -Textureimporter1.spritepackingtag =ab_atlas1; theTextureimporter1.spriteimportmode =Spriteimportmode.single; - Textureimporter1.saveandreimport (); -}
After the normal packaging can be, also note that if the Packingtag is the same and abname different, will hit a different package.
Unity5 Assetbundle is not able to hit the atlas is still the cause of the scatter map