您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

22 行
602 B

  1. require("Editor.CompileFile")
  2. local function processAnimation(fileName)
  3. local Material = cc.MaterialFileCache:getInstance():load(fileName);
  4. print("载入Material:" , fileName);
  5. end
  6. -- 生成所有语言
  7. function generateMaterials(textureFile)
  8. local function saveui(fileName)
  9. -- 返回pathName , baseName , ext
  10. local pathName , baseName , ext = string.splitFilename(fileName);
  11. print(pathName , baseName , ext);
  12. if string.lower(ext) == "animation" then
  13. processAnimation(fileName);
  14. end
  15. end
  16. visitPath("res" , saveui);
  17. cc.MaterialFileCache:getInstance():saveToFile(textureFile);
  18. end