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

Function processTextAsset

src/core/resourceProcessor.js:411–423  ·  view source on GitHub ↗

* 处理文本资源 * @param {Object} data 文本数据 * @param {string} key 键名

(data, key)

Source from the content-addressed store, hash-verified

409
410 if (rootType === 'cc.SceneAsset') {
411 this.writeSceneDocument(clone, uuidKey);
412 return;
413 }
414 if (rootType === 'cc.Prefab') {
415 this.writePrefabDocument(clone, uuidKey);
416 return;
417 }
418
419 // Fallback: dispatch root if it has a handler; also walk for known types
420 // without resolving cross-ids into object graphs.
421 this.dispatchRestoredArray(clone, uuidKey);
422 },
423
424 writeSceneDocument(doc, uuidKey) {
425 const name = (doc[0] && doc[0]._name) || 'Scene';
426 const filename = `${name}.fire`;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected