示例#1
0
        // inPath 类似这样 Assets/Res/Image/UI/Common/denglu_srk.png , outPath = Assets/Prefabs/Resources/Atlas/aaa.asset
        public void packSprite(string inPath, string outPath)
        {
            m_soSprite = ScriptableObject.CreateInstance<SOSpriteList>();

            Sprite[] spriteArr = AtlasPrefabUtil.loadAllSprite(inPath);
            m_soSprite.addSprite("aaa", spriteArr[0]);
            AssetDatabase.CreateAsset(m_soSprite, outPath);
        }
示例#2
0
 public void addSprite2SO(SOSpriteList soSprite)
 {
     string assetsImagePath = ExportUtil.convFullPath2AssetsPath(m_fullPath);
     Sprite[] allSpritesArr = AtlasPrefabUtil.loadAllSprite(assetsImagePath);
     soSprite.addSprite(m_subPathNoExt, allSpritesArr[0]);
 }