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.
Parameters
Section titled “Parameters”source
Section titled “source”overrides
Section titled “overrides”readonly PrefabOverride[]