baking-type-cleanup-component

Community

Recompute results when baked entities change

AuthordyCuong03
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevent stale or incorrect runtime/baking outputs by reliably tracking entity lifecycle events (creation, re-parenting, and destruction) across incremental baking passes.

Core Features & Use Cases

  • Lifecycle-aware cleanup component: Uses ICleanupComponentData together with [BakingType] so cleanup survives entity destruction while the primary baked component is stripped from the runtime world.
  • Destroyed-entity detection: Detects entities whose baked components disappeared but whose cleanup remains, then triggers recomputation for dependent parent-level data.
  • Re-parenting handling: Stores the previous Parent (or equivalent hierarchy reference) in the cleanup component and compares it to the current hierarchy to trigger correct updates.
  • Stale-growth prevention: Removes the cleanup component after processing to avoid accumulating old cleanup records over multiple baking passes.

Quick Start

Add a [BakingType]-tagged ICleanupComponentData cleanup struct, write it onto newly baked entities, and on each bake pass recompute impacted parent-dependent data when cleanup entities are found without the corresponding baked components anymore.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: baking-type-cleanup-component
Download link: https://github.com/dyCuong03/unity-agent-team/archive/main.zip#baking-type-cleanup-component

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.