Вы не можете выбрать более 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