Quick answer: Unity ECS IAspect method missing in compiled code despite the source-generated wrapper existing? Codegen artifacts stale — delete Library/ScriptAssemblies, rebuild.

Adding a new method to an aspect; the IDE sees it but the job using the aspect compiles with an error.

Clean Codegen Cache

Close Unity. Delete Library/ScriptAssemblies and Library/Bee. Reopen Unity. Source generators run fresh, codegen produces up-to-date wrappers.

Force Recompile

Right-click an asmdef → Reimport. Triggers a recompile of that assembly and its dependents. Often catches missed codegen.

Source Generator Diagnostics

Window → Analysis → Compile Errors. Source-generator errors sometimes hide here, not in console. Check after every ECS code change.

Burst Inspector Sanity Check

If the job compiles to Native, codegen succeeded. If it falls back to Managed with the aspect reference, codegen is missing a piece.

Verifying

Aspect methods callable in jobs. Burst compiles successfully; runtime behaves identically to expected.

“Aspect codegen caches. Clean Library on weird missing-method errors.”

After ECS package upgrades, do the full clean — codegen formats can change subtly and stale outputs cause baffling errors.