MCPcopy Create free account
hub / github.com/Crain99/cc-reverse / resolveReferences

Function resolveReferences

src/core/resourceProcessor.js:297–325  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

295 isEmptyObject(obj) {
296 if (obj == null || typeof obj !== 'object') return true;
297 for (const key in obj) {
298 return false;
299 }
300 return true;
301 },
302
303 /**
304 * 判断是否为 packedAssets 映射到的多资源包
305 */
306 isPackedImportKey(key) {
307 return Object.prototype.hasOwnProperty.call(this._packedMap, key);
308 },
309
310 /**
311 * 处理单个 import JSON(可能是 packed 或独立文档)
312 */
313 async processImportFile(key, data, filePath) {
314 if (!global.settings || this.isEmptyObject(global.settings)) {
315 logger.warn('全局设置为空,跳过数据处理');
316 return;
317 }
318
319 // Texture2D serialized as { type, data } — skip binary blob meta
320 if (data && typeof data === 'object' && !Array.isArray(data) && data.type === 'cc.Texture2D') {
321 return;
322 }
323
324 if (this.isPackedImportKey(key) && Array.isArray(data)) {
325 await this.processPackedImport(key, data);
326 return;
327 }
328

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected