Files
cocos4/cocos/core/utils/prefab-link.ts
T
minggo 0d7c5c8f56 move cocos/core/scene-graph to cocos/scene-graph (#12868)
* move `cocos/core/scene-graph` to `cocos/scene-graph`
* move some files in `cocos/core/components` to `cocos/scene-graph`:
  - component.ts
  - component-event-handler.ts
  - component-event-handler-schema.ts
* move some files in `cocos/core/components` to `cocos/misc`: 
  - missing-script.ts
  - model-renderer.ts
  - renderer.ts
  - camera-component.ts
* move  `cocos/core/components/system.ts` to ``cocos/core/system.ts``
2022-09-26 11:02:22 +08:00

23 lines
1.0 KiB
TypeScript

import { ccclass, serializable, type, visible } from '../data/decorators';
import { Component } from '../../scene-graph/component';
import { Prefab } from '../../asset/assets/prefab';
/**
* @en
* Since the new Prefab system is not yet complete, the prefab that has a large difference with prefab asset cannot be automatically migrated.
* This component is used to save the relationship between the node with the referenced prefab asset in the old Prefab system.
* When the new Prefab system is complete, it will be automatically migrated to the new Prefab system.
*
* @zh
* PrefabLink
* 由于新的 Prefab 系统还不完善,所以旧的 Prefab 系统中和 Prefab 资源差异过大的 Prefab 无法实现自动迁移。
* 此组件用于保存在旧 Prefab 系统中这个节点关联的 Prefab 资源,等新的 Prefab 系统完善,会自动迁移到新的 Prefab 系统上。
*/
@ccclass('cc.PrefabLink')
export class PrefabLink extends Component {
@type(Prefab)
@serializable
@visible(true)
public prefab: Prefab | null = null;
}