resolvePrefab beta
Function of @v12-engine/editor
ts
export declare function resolvePrefab(file: PrefabFile, read: (name: string) => PrefabFile | undefined, within?: readonly string[]): {
contents: MapClip;
sources: Record<string, number>;
problems: {
rule: string;
message: string;
}[];
};What a prefab is when it is placed, read from its file and the files it names: a variant's source with its overrides, then the file's own parts, then each prefab inside it unpacked where it says, under ids of their own (nestedPartId); with the versions of the others it was made of, and what is wrong (a prefab that holds itself, a source or a prefab inside it that has no file: left out, and said)