public static void BatchModeExportAssets() { ysUiBundleFunc editorFunc = new ysUiBundleFunc(); editorFunc.InitData(); editorFunc.ExportUiPrefab(); editorFunc.ExportAtlasPrefab(); editorFunc.ExportTexture(); editorFunc.ExportFont(); }
public static void SetAtlasFormat() { ysUiBundleFunc func = new ysUiBundleFunc(); func.InitData(); List <Texture> prefabList = func.ReadTextureList(func.data.path.AtlasDirectoryPath); for (int i = 0; i < prefabList.Count; i++) { TextureImporter importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(prefabList[i])) as TextureImporter; if (importer.textureFormat != TextureImporterFormat.ETC2_RGBA8) { importer.SetPlatformTextureSettings("Android", 4096, TextureImporterFormat.ETC2_RGBA8, 100, false); importer.SaveAndReimport(); } } }
static void InitData() { func.InitData(); }