wave8-dependency-complete-editor-only-fence

Limits state.Dependency.Complete() to UNITY_EDITOR diagnostic use in DOTS systems.

6|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/dyCuong03/unity-agent-team --skill wave8-dependency-complete-editor-only-fence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wave8-dependency-complete-editor-only-fence
Source: https://github.com/dyCuong03/unity-agent-team/tree/main/.claude/skills/unity-dots/wave8-dependency-complete-editor-only-fence
Command: npx skills add https://github.com/dyCuong03/unity-agent-team --skill wave8-dependency-complete-editor-only-fence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents the common ECS/DOTS mistake of using state.Dependency.Complete() as a general “make jobs finish” mechanism, which silently destroys parallelism and causes main-thread stalls.

Core Features & Use Cases

  • Editor-only diagnostic fencing: Applies Complete() only under UNITY_EDITOR to inspect intermediate NativeArray/job results without shipping the anti-pattern.
  • Production-safe dependency chaining: Encourages correct propagation of job dependencies so consuming systems naturally synchronize without sync points.
  • Risk and performance guardrails: Highlights runtime and profiler risks (e.g., WaitForJobGroupID stalls) and provides architecture guidance to fix broken dependency chains.

Quick Start

Add a UNITY_EDITOR-guarded state.Dependency.Complete() call around a temporary diagnostic fence when you need to inspect intermediate job state, and remove it before merging.

Frequently Asked Questions about wave8-dependency-complete-editor-only-fence

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does calling state.Dependency.Complete() in Unity DOTS destroy job system performance?

Calling state.Dependency.Complete() forces a main-thread sync point, halting parallel job execution and causing stalls. It should only be used as an editor-only diagnostic probe to inspect intermediate NativeArray state, not for production dependency chaining.

How do I safely inspect intermediate NativeArray job outputs in Unity DOTS without breaking parallelism?

To safely inspect intermediate job outputs, wrap state.Dependency.Complete() in a UNITY_EDITOR guard. This editor-only diagnostic fence allows you to debug scheduling and NativeArray state in development without shipping sync points to production.

What is the correct way to chain ECS job dependencies without using Complete()?

Correct ECS dependency chaining propagates job handles naturally between consuming systems. By avoiding Complete() and passing dependencies correctly, downstream systems synchronize automatically without forcing main-thread sync points or destroying parallelism.

Can I use state.Dependency.Complete() in a production Unity DOTS build?

No, using state.Dependency.Complete() in production builds introduces main-thread stalls and WaitForJobGroupID profiler risks. It must be guarded by UNITY_EDITOR and limited to development diagnostics to prevent shipping ECS job synchronization anti-patterns.

What causes WaitForJobGroupID stalls in the Unity DOTS job system profiler?

WaitForJobGroupID stalls occur when forcing job synchronization on the main thread, typically by calling state.Dependency.Complete(). Limiting this to editor-only diagnostic usage prevents these sync-point performance penalties in production.

When should I not use Complete() on ECS job dependencies?

You should not use Complete() for general job synchronization or dependency management. Avoid it outside of editor-only diagnostic scenarios, as it destroys parallelism and introduces main-thread stalls that degrade runtime performance.