What problem does it solve?
This Skill prevents stale Unity DOTS baked data by ensuring a Baker explicitly registers external asset and component dependencies so Unity invalidates and re-bakes when those dependencies change.
Core Features & Use Cases
- Dependency tracking for external inputs: Use
DependsOn(...) for referenced assets and components that are read via raw Unity API rather than direct serialized fields.
- Correct incremental baking behavior: Ensures SubScene baking re-triggers when ScriptableObjects, textures, or child components change—even when the primary authoring MonoBehaviour hasn’t changed.
- Anti-pattern prevention: Avoids silent correctness bugs caused by missing
DependsOn or relying on non-tracked reads (child traversal, raw GetComponent calls).
Use case: your Baker reads a ScriptableObject config plus a child MeshRenderer to author entities; without DependsOn, changing the asset or child component can leave the previously baked entity data stale until a manual reimport.
Quick Start
In your Baker, call DependsOn(...) for every ScriptableObject/texture or child component you read through raw Unity APIs so incremental baking invalidates correctly.