跳转到内容

applyOverridesToSource

此内容尚不支持你的语言。

applyOverridesToSource(source, overrides): PrefabData

Defined in: prefab/override.ts:133

Bake a set of overrides into a prefab’s source, returning a NEW PrefabData with the changes applied as the base (entity identities preserved). This is the core of editor “Apply to Prefab”: an instance’s overrides (from diffAgainstSource) become the prefab’s new base, so every instance re-derives from them.

Scope matches diffAgainstSource: property / name / visibility / component add·replace·remove / metadata overrides on existing prefab entities. Structural changes (entities the instance added or removed) are not folded in — the caller surfaces those separately. Pure: the input source is not mutated.

PrefabData

readonly PrefabOverride[]

PrefabData