You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 rivejä
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