main.js 805 B

123456789101112131415161718192021
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.seek_where = void 0;
  4. const Utils_1 = require("../Utils");
  5. const Path = require("path");
  6. const WPrefabParse_1 = require("./componentParse/WPrefabParse");
  7. async function seek_where(uuid) {
  8. let fileList = Utils_1.Utils.findAllFile((path) => {
  9. let ext = Path.extname(path);
  10. return ext == '.prefab' || ext == '.scene';
  11. });
  12. let compressedUuid = Editor.Utils.UUID.compressUUID(uuid, false);
  13. console.log('compressedUuid', compressedUuid);
  14. let prefabParse = new WPrefabParse_1.PrefabParse();
  15. for (let path of fileList) {
  16. await prefabParse.testPrefab(path, uuid, compressedUuid);
  17. }
  18. let result = prefabParse.getResult();
  19. return result;
  20. }
  21. exports.seek_where = seek_where;