unity-ecs-patterns – skill Dữ liệu & Khoa học cho agent AI
Làm chủ Unity ECS (Entity Component System) với DOTS, Jobs và Burst để phát triển game hiệu năng cao. Dùng khi xây dựng game hướng dữ liệu, tối ưu hiệu năng hoặc làm việc với số lượng entity lớn.
Cài skill unity-ecs-patterns bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/unity-ecs-patterns-3f871.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /unity-ecs-patterns – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/unity-ecs-patterns-3f871.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $unity-ecs-patterns – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/unity-ecs-patterns-3f871.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /unity-ecs-patterns – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/unity-ecs-patterns-3f871.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /unity-ecs-patterns – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Unity ECS Patterns
Production patterns for Unity's Data-Oriented Technology Stack (DOTS) including Entity Component System, Job System, and Burst Compiler.
When to Use This Skill
- Building high-performance Unity games
- Managing thousands of entities efficiently
- Implementing data-oriented game systems
- Optimizing CPU-bound game logic
- Converting OOP game code to ECS
- Using Jobs and Burst for parallelization
Core Concepts
1. ECS vs OOP
| Aspect | Traditional OOP | ECS/DOTS |
| ----------- | ----------------- | --------------- |
| Data layout | Object-oriented | Data-oriented |
| Memory | Scattered | Contiguous |
| Processing | Per-object | Batched |
| Scaling | Poor with count | Linear scaling |
| Best for | Complex behaviors | Mass simulation |
2. DOTS Components
Entity: Lightweight ID (no data)
Component: Pure data (no behavior)
System: Logic that processes components
World: Container for entities
Archetype: Unique combination of components
Chunk: Memory block for same-archetype entitiesDetailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
Do's
- Use ISystem over SystemBase - Better performance
- Burst compile everything - Massive speedup
- Batch structural changes - Use ECB
- Profile with Profiler - Identify bottlenecks
- Use Aspects - Clean component grouping
Don'ts
- Don't use managed types - Breaks Burst
- Don't structural change in jobs - Use ECB
- Don't over-architect - Start simple
- Don't ignore chunk utilization - Group similar entities
- Don't forget disposal - Native collections leak
Skill liên quan
- usfiscaldata – Truy vấn REST API Fiscal Data của Kho bạc Hoa Kỳ để lấy dữ liệu tài chính liên bang…
- error-diagnostics-error-analysis – Bạn là chuyên gia phân tích lỗi, có chuyên môn sâu về gỡ lỗi hệ thống phân tán, phân…
- tensorrt-llm – Suy luận LLM thông lượng cao trên GPU NVIDIA.
- vaex – Xử lý tập dữ liệu khoa học dạng bảng lớn bằng biểu thức Vaex, chế độ xem đã lọc, thống…
- waypoint-bio – Hỗ trợ làm việc với các mô hình nền tảng vi sinh vật mở của Outpost Bio — các checkpoint…
- research – Điểm vào mặc định cho mọi yêu cầu nghiên cứu — bộ định tuyến lai phân loại câu hỏi một…
- research-finance – Dùng khi quản lý ngân sách cho chương trình hoặc danh mục R&D nội bộ — lập ngân sách…
- torchtitan – Tiền huấn luyện LLM quy mô lớn với song song 4D của PyTorch.