What problem does it solve?
TransformUsageFlags ensures each entity gets the correct transform components during ECS baking, preventing both wasted components on data-only entities and missing components that break moving entities.
Core Features & Use Cases
- Precise bake-time transform declaration: Choose
TransformUsageFlags.None, Dynamic, Renderable, or ManualOverride to match runtime behavior.
- Correct behavior for moving vs data-only entities: Avoid spurious
LocalTransform/LocalToWorld on entities that never move, and ensure transforms exist when entities do move.
- Prefab-safe entity references: Use the matching flags when calling
GetEntity for prefab fields to keep archetypes consistent.
- Batching-friendly manual overrides: Use
ManualOverride with ComponentTypeSet to minimize structural changes while taking full responsibility for adding transforms.
Quick Start
In your Baker, call GetEntity with TransformUsageFlags.Dynamic for entities that move at runtime and use TransformUsageFlags.None for config/singletons so that only the required transform components are baked.