wave4-entity-index-in-query-scatter-pattern

Community

Lock-free scatter results per entity index.

AuthordyCuong03
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It solves the challenge of safely writing per-entity computed results into a shared NativeArray from a parallel Entities job without collisions or locks.

Core Features & Use Cases

  • Stable per-entity indexing: Uses [EntityIndexInQuery] so each entity writes to its own pre-allocated array slot.
  • Lock-free parallel scatter → downstream gather: Supports a two-phase workflow where scatter runs in parallel and a later phase consumes the results.
  • Capacity correctness: Emphasizes sizing the array from query.CalculateEntityCount() to prevent out-of-bounds writes in Burst.

Use it when you have a parallel IJobEntity that must produce a result per entity for an inter-job pipeline (for example, computing and storing positions/derived data for a later job that reads them).

Quick Start

Use the [EntityIndexInQuery] index in a Burst-compiled IJobEntity to scatter into a NativeArray sized from query.CalculateEntityCount() for a downstream gather phase.

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: wave4-entity-index-in-query-scatter-pattern
Download link: https://github.com/dyCuong03/unity-agent-team/archive/main.zip#wave4-entity-index-in-query-scatter-pattern

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.