Ejemplo n.º 1
0
        public static void Generate(string jsonName, InputParam inputParam_)
        {
            Initialize();

            _isHighQuality = inputParam_.isHighQuality;

            _atlasName = AtlasBatchSetting.GetBatchedAtlasName(jsonName);   //获取实际的图集名称

            //WriteBatchedReadme(_atlasName, jsonName);   //提醒图集已经移到partxx

            List <string> batchedAtlasNameList = AtlasBatchSetting.GetBatchedAtlasNameList(jsonName);    //收集此图集包含的所有json名称

            for (int i = 0; i < batchedAtlasNameList.Count; i++)
            {
                string name = batchedAtlasNameList[i];
                if (batchedAtlasNameList.Count == 1 || i > 0)   //如果多于一个,跳过第一个,因为那个是目标图集,不是界面
                {
                    JsonData jsonData = KAssetManager.GetUIJsonData(name);
                    ProcessJson(jsonData);  //处理所有该图集需要用到的json, 不只是该界面的json
                }
            }

            //处理散图
            ProcessTextureDataList();

            if (_uniqueTextureDataList.Count > 0)
            {
                //需要生成图集
                GenerateAtlas();
            }
            else
            {
                Debug.Log("面板资源都在公共图集中~~~~");
            }
        }
Ejemplo n.º 2
0
        static void PrepareAtlasFolders(string atlasName)
        {
            List <string> names = AtlasBatchSetting.GetBatchedAtlasNameList(atlasName);

            for (int i = 0; i < names.Count; i++)
            {
                KAssetManager.CreateAtlasFolder(names[i]);
            }
        }