Class BakeDerivedTypesAttribute
Attribute that informs the baking system that bakers of types derived from the current authoring component must be executed.
Namespace: Unity.Entities
Assembly: solution.dll
Syntax
public class BakeDerivedTypesAttribute : Attribute
Remarks
Use this attribute on bakers which handle authoring components that can be specialized. In the example below, both the BaseBaker and the DerivedBaker are invoked when baking the DerivedAuthoring component.
Examples
class BaseAuthoring : MonoBehaviour { public int BaseValue; }
class DerivedAuthoring : BaseAuthoring { public float DerivedValue; }
[BakeDerivedTypes]
class BaseBaker : Baker<BaseAuthoring> { public override void Bake(BaseAuthoring authoring) { }
class DerivedBaker : Baker<DerivedAuthoring> { public override void Bake(DerivedAuthoring authoring) { }
See Also
Baker<TAuthoringType>