Remaps components and their serialized references to a MergedModel's hierarchy. Create a
subclass that inherits from this when additional remapping behavior is needed when remapping components.
Inheritance
RemapBehavior<T>
public class RemapBehavior<T> : IRemapBehavior where T : Component
Type Parameters
Methods
Declaration
public void AddSourceComponent(Component component)
Parameters
Declaration
public void Finalize(MergedModel mergedModel)
Parameters
Declaration
public virtual void Init(ComponentRemapMergeBehavior mergeBehavior)
Parameters
Called after OnComponentPostMerge(T, T) for each component that was remapped to the merged model.
All dependencies between remapped components should be resolved here (if needed). Base behavior remaps
all serialized references.
Declaration
protected virtual void OnComponentFinalize(MergedModel mergedModel, T source, T copy)
Parameters
Type |
Name |
Description |
MergedModel |
mergedModel |
|
T |
source |
|
T |
copy |
|
OnComponentPostMerge(T, T)
Called after the model has been merged for each component that was remapped to the merged model.
Remapping behavior should be done here. Base behavior will copy the source's component values to the copy component.
Declaration
protected virtual void OnComponentPostMerge(T source, T copy)
Parameters
Type |
Name |
Description |
T |
source |
|
T |
copy |
|
Called before the model is merged for each component found on the original model.
Setup any pre-merge behavior here. Base behavior will add root nodes for the T component and each
of its serialized Component/GameObject references on the merged model.
Declaration
protected virtual void OnComponentPreMerge(MergedModel mergedModel, T source)
Parameters
PostMerge(MergedModel)
Declaration
public void PostMerge(MergedModel mergedModel)
Parameters
Declaration
public void PreMerge(MergedModel mergedModel)
Parameters