* 处理文本资源 * @param {Object} data 文本数据 * @param {string} key 键名
(data, key)
| 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`; |
nothing calls this directly
no outgoing calls
no test coverage detected