Token导航 LogoToken导航

Agent Skill · 前端设计

unity-ecs-dots(Unity ECS dots 命令行)

unity-ecs-dots 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

unity-ecs-dots 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 8,040。

总安装 318周安装 13GitHub Stars 14下载 103核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:unity-ecs-dots(Unity ECS dots 命令行)
来源仓库:https://github.com/nice-wolf-studio/unity-claude-skills
仓库路径:skills/unity-ecs-dots
安装命令:
npx skills add https://github.com/nice-wolf-studio/unity-claude-skills --skill unity-ecs-dots
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/nice-wolf-studio/unity-claude-skills --skill unity-ecs-dots

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于处理 Unity ECS(Entity Component System)与 DOTS 相关的 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕代码变更或协作事项进行整理时使用。

通过 npx skills add 命令从 GitHub 仓库安装并使用。安装前建议确认权限范围和维护状态,避免触发不必要的联网或文件操作。unity-ecs-dots 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/unity-ecs-dots

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/nice-wolf-studio/unity-claude-skills --skill u…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

unity-ecs-dots 怎么安装?

在终端执行 npx skills add https://github.com/nice-wolf-studio/unity-claude-skills --skill unity-ecs-d…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

unity-ecs-dots 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

unity-ecs-dots 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

unity-ecs-dots 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

unity-ecs-dots 用的人多吗?

公开数据是累计安装 318 次,近一周安装 13 次,下载 103 次,GitHub 14 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

unity-ecs-dots 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
unity-ecs-dots

Unity ECS dots 命令行 · 本页

31814需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Unity ECS / DOTS (Data-Oriented Technology Stack)

Based on Unity 6.3 LTS (6000.3) -- Entities 1.3, Burst 1.8, Jobs package

Core Concepts

ECS (Entity Component System) is Unity's data-oriented framework. It replaces the GameObject/MonoBehaviour model with a cache-friendly, high-performance architecture.

ECS vs MonoBehaviour

AspectMonoBehaviourECS
IdentityGameObject (heavy, managed)Entity (lightweight int ID)
DataClass fields on componentsUnmanaged structs (IComponentData)
LogicMethods on MonoBehaviourSystems (ISystem / SystemBase)
Memory layoutScattered across heapContiguous chunks by archetype
ThreadingMain thread onlyJobs + Burst for parallel work

Entities

Entities are lightweight identifiers (an index + version integer). They have no behavior and no data -- they are handles used to associate components.

Components (IComponentData)

Components are unmanaged structs with no methods. They hold only data.

using Unity.Entities;

public struct Speed : IComponentData
{
    public float Value;
}

public struct Health : IComponentData
{
    public float Current;
    public float Max;
}

Archetypes and Chunks

An archetype is a unique combination of component types. All entities with the same set of components share an archetype. Entities are stored in chunks (16 KB blocks) grouped by archetype, enabling cache-efficient iteration.

World and EntityManager

A World contains an EntityManager and a set of systems. The default world is created automatically. EntityManager is the primary API for creating/destroying entities and adding/removing components.

Baking and SubScene Workflow

Baking converts authoring GameObjects into runtime entities. This is a one-way conversion that happens at build time or when a SubScene is loaded in the Editor.

Baker

using Unity.Entities;

// Authoring component (MonoBehaviour on GameObject)
public class SpeedAuthoring : MonoBehaviour
{
    public float speed;
}

// Baker converts authoring data to ECS components
public class SpeedBaker : Baker<SpeedAuthoring>
{
    public override void Bake(SpeedAuthoring authoring)
    {
        var entity = GetEntity(TransformUsageFlags.Dynamic);
        AddComponent(entity, new Speed { Value = authoring.speed });
    }
}

SubScene

  • SubScenes contain GameObjects that are baked into entities at build time
  • At runtime, entity data streams in efficiently (no GameObject overhead)
  • In the Editor, SubScenes can be opened for editing (shows GameObjects) or closed (shows baked entities)
  • Always place ECS-managed objects inside a SubScene

TransformUsageFlags

FlagUse
DynamicEntity moves at runtime (gets LocalTransform, LocalToWorld)
RenderableEntity is rendered but not moved by code
WorldSpaceEntity uses world-space transform only
NoneNo transform components added

Systems

Systems contain all logic. They iterate over entities that match a component query.

ISystem (Recommended)

ISystem is the modern, unmanaged system type. It is Burst-compatible and should be preferred over SystemBase.

using Unity.Burst;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Transforms;

[BurstCompile]
public partial struct MovementSystem : ISystem
{
    [BurstCompile]
    public void OnCreate(ref SystemState state)
    {
        state.RequireForUpdate<Speed>();
    }

    [BurstCompile]
    public void OnUpdate(ref SystemState state)
    {
        float deltaTime = SystemAPI.Time.DeltaTime;

        foreach (var (transform, speed) in
            SystemAPI.Query<RefRW<LocalTransform>, RefRO<Speed>>())
        {
            transform.ValueRW.Position +=
                new float3(0, 0, speed.ValueRO.Value * deltaTime);
        }
    }

    [BurstCompile]
    public void OnDestroy(ref SystemState state) { }
}

Key points:

  • Must be a partial struct
  • Use [BurstCompile] on the struct and each method
  • OnCreate, OnUpdate, OnDestroy receive ref SystemState
  • state.RequireForUpdate<T>() -- system only runs when T exists
  • SystemAPI.Query<T>() -- type-safe foreach iteration

SystemBase (Managed, Legacy)

SystemBase is a managed class-based system. It supports managed code but cannot be Burst-compiled at the system level. Use ISystem for all new code. SystemBase uses Entities.ForEach() lambda syntax instead of SystemAPI.Query.

SystemGroup and Update Ordering

Systems are organized into groups that update in a defined order:

InitializationSystemGroup
  -> BeginInitializationEntityCommandBufferSystem
SimulationSystemGroup (default group)
  -> BeginSimulationEntityCommandBufferSystem
  -> [Your systems go here by default]
  -> EndSimulationEntityCommandBufferSystem
PresentationSystemGroup
  -> BeginPresentationEntityCommandBufferSystem

Control ordering with attributes:

[UpdateInGroup(typeof(SimulationSystemGroup))]
[UpdateBefore(typeof(OtherSystem))]
[UpdateAfter(typeof(AnotherSystem))]
public partial struct MySystem : ISystem { }

SystemAPI

SystemAPI provides static methods for safe, Burst-compatible access:

MethodPurpose
SystemAPI.Query<T1, T2>()Iterate matching entities
SystemAPI.TimeAccess TimeData (DeltaTime, ElapsedTime)
SystemAPI.GetSingleton<T>()Get singleton component value
SystemAPI.SetSingleton<T>(value)Set singleton component value
SystemAPI.GetComponent<T>(entity)Read component from entity
SystemAPI.SetComponent<T>(entity, value)Write component on entity
SystemAPI.HasComponent<T>(entity)Check if entity has component
SystemAPI.GetComponentLookup<T>()Get random-access lookup
SystemAPI.GetBuffer<T>(entity)Get DynamicBuffer
SystemAPI.GetAspect<T>(entity)Get aspect for entity

Components Deep Dive

IComponentData (Unmanaged Struct)

The fundamental component type. Must be an unmanaged struct (no reference types, no managed arrays).

ISharedComponentData

Shared across entities -- entities with the same shared component value are grouped into the same chunk. Changing a shared component value is a structural change.

public struct TeamId : ISharedComponentData
{
    public int Value;
}

IBufferElementData (DynamicBuffer)

Variable-length arrays attached to entities.

[InternalBufferCapacity(8)]
public struct DamageEvent : IBufferElementData
{
    public float Value;
    public Entity Source;
}

// Usage in a system
foreach (var (buffer, entity) in SystemAPI.Query<DynamicBuffer<DamageEvent>>()
    .WithEntityAccess())
{
    for (int i = 0; i < buffer.Length; i++)
        totalDamage += buffer[i].Value;
    buffer.Clear();
}

ICleanupComponentData

Persists after entity destruction. Used for cleanup logic (e.g., releasing native resources). The entity is not fully destroyed until all cleanup components are removed.

IEnableableComponent

Components that can be toggled on/off without structural changes (no chunk moves).

public struct Stunned : IComponentData, IEnableableComponent { }

// Toggle in system
SystemAPI.SetComponentEnabled<Stunned>(entity, true);
bool isStunned = SystemAPI.IsComponentEnabled<Stunned>(entity);

Tag Components

Zero-size structs used purely for filtering queries. No fields -- zero memory cost per entity.

public struct IsPlayer : IComponentData { }

Common Patterns

Creating and Destroying Entities

// Direct creation (structural change -- main thread only)
Entity e = entityManager.CreateEntity(typeof(Speed), typeof(Health));

// Preferred: use EntityCommandBuffer for deferred structural changes
var ecb = new EntityCommandBuffer(Allocator.TempJob);
Entity e2 = ecb.CreateEntity();
ecb.AddComponent(e2, new Speed { Value = 5f });
ecb.Playback(entityManager);
ecb.Dispose();

EntityCommandBuffer (ECB)

Structural changes (create/destroy entity, add/remove component) cannot happen during iteration. Use ECB to defer them. See references/ecs-api.md for full ECB API.

System-Managed ECB (Preferred)

[BurstCompile]
public partial struct SpawnSystem : ISystem
{
    [BurstCompile]
    public void OnUpdate(ref SystemState state)
    {
        var ecbSingleton = SystemAPI.GetSingleton<
            EndSimulationEntityCommandBufferSystem.Singleton>();
        var ecb = ecbSingleton.CreateCommandBuffer(state.WorldUnmanaged);
        // ecb is played back automatically -- no Playback/Dispose needed
        foreach (var spawner in SystemAPI.Query<RefRW<Spawner>>())
        {
            if (spawner.ValueRO.Timer <= 0)
            {
                ecb.Instantiate(spawner.ValueRO.Prefab);
                spawner.ValueRW.Timer = spawner.ValueRO.Interval;
            }
        }
    }
}

Singleton Components

Use when exactly one entity has a given component. Access via SystemAPI.GetSingleton<T>() / SystemAPI.SetSingleton<T>(value) / SystemAPI.GetSingletonRW<T>(). Useful for global config, game state, and similar one-of-a-kind data.

Aspects (IAspect)

Aspects group related components into a single access wrapper with optional methods.

public readonly partial struct CharacterAspect : IAspect
{
    public readonly RefRW<LocalTransform> Transform;
    public readonly RefRO<Speed> Speed;
    public readonly RefRW<Health> Health;

    public void Move(float3 direction, float deltaTime)
    {
        Transform.ValueRW.Position +=
            direction * Speed.ValueRO.Value * deltaTime;
    }
}

// Use in system
foreach (var character in SystemAPI.Query<CharacterAspect>())
{
    character.Move(new float3(1, 0, 0), deltaTime);
}

Jobs System

IJobEntity (Recommended)

Automatically generates an EntityQuery from the Execute parameter types.

[BurstCompile]
public partial struct MoveJob : IJobEntity
{
    public float DeltaTime;

    void Execute(ref LocalTransform transform, in Speed speed)
    {
        transform.Position += new float3(0, 0, speed.Value * DeltaTime);
    }
}

// Schedule from system
[BurstCompile]
public partial struct MoveSystem : ISystem
{
    [BurstCompile]
    public void OnUpdate(ref SystemState state)
    {
        new MoveJob
        {
            DeltaTime = SystemAPI.Time.DeltaTime
        }.ScheduleParallel();
    }
}

IJobChunk (Low-Level)

Manual chunk iteration for maximum control. See references/jobs-burst.md for full examples.

Job Scheduling

MethodBehavior
Run()Execute on main thread (no job scheduling)
Schedule()Single-threaded job on worker thread
ScheduleParallel()Multi-threaded across chunks

ECB in Parallel Jobs

[BurstCompile]
public partial struct DestroyDeadJob : IJobEntity
{
    public EntityCommandBuffer.ParallelWriter ECB;

    void Execute([ChunkIndexInQuery] int sortKey, in Health health, Entity entity)
    {
        if (health.Current <= 0)
            ECB.DestroyEntity(sortKey, entity);
    }
}

Burst Compiler

The Burst compiler translates IL/.NET bytecode into highly optimized native code using LLVM.

Usage

Add [BurstCompile] to ISystem structs (and each method) and IJobEntity structs. Burst compiles them to optimized native code via LLVM.

Restrictions

  • No managed types (no class, string, List<T>, managed arrays)
  • No allocations (no new for reference types)
  • No try/catch/finally
  • No virtual methods or interfaces (except job interfaces)
  • No static mutable fields (use SharedStatic<T> instead)
  • Must use NativeContainer types for collections

Unity.Mathematics

Burst-optimized math library replacing UnityEngine.Mathf and Vector3:

using Unity.Mathematics;

float3 position = new float3(1, 2, 3);
quaternion rot = quaternion.Euler(0, math.PI, 0);
float dist = math.distance(a, b);
float3 dir = math.normalize(b - a);
float val = math.lerp(0f, 1f, 0.5f);
UnityEngineUnity.Mathematics
Vector3float3
Vector2float2
Quaternionquaternion
Mathf.Lerpmath.lerp
Mathf.Sinmath.sin
Matrix4x4float4x4

Anti-Patterns

WhatWhy It's WrongFix
Using SystemBase when ISystem worksCannot Burst-compile system, heap allocationsUse ISystem (partial struct) with [BurstCompile]
Structural changes during iterationInvalidates iterators, causes exceptionsUse EntityCommandBuffer for deferred changes
Structural changes in parallel jobs without ECBRace conditions, crashesUse EntityCommandBuffer.ParallelWriter with sort key
Managed types in Burst-compiled codeBurst cannot compile managed typesUse unmanaged structs, FixedString, NativeContainer
Missing [BurstCompile] on ISystemSystem runs as managed code, loses performanceAdd [BurstCompile] to struct and all methods
Allocating NativeArray every frame without disposingMemory leakAllocate with Allocator.Temp or dispose in OnDestroy
Using UnityEngine.Mathf in Burst codeNot Burst-optimizedUse Unity.Mathematics.math
Forgetting state.RequireForUpdate<T>()System runs even when no matching entities existCall in OnCreate to skip updates when unnecessary
Modifying SharedComponentData frequentlyEach change is a structural change (chunk move)Use regular IComponentData for frequently changing data
Using GetComponent in inner loopsRandom access breaks cache coherencyUse SystemAPI.Query for linear iteration

Key API Quick Reference

Class / StructKey MembersNotes
EntityManagerCreateEntity, DestroyEntity, AddComponent<T>, RemoveComponent<T>, GetComponentData<T>, SetComponentData<T>Main-thread only; structural changes
EntityCommandBufferCreateEntity, DestroyEntity, AddComponent, RemoveComponent, Instantiate, PlaybackDeferred structural changes
ECB.ParallelWriterSame as ECB but with sortKey parameterThread-safe for parallel jobs
SystemAPIQuery<T>, Time, GetSingleton<T>, GetComponent<T>, GetComponentLookup<T>Static access from systems
EntityQueryToEntityArray, ToComponentDataArray<T>, CalculateEntityCountBulk operations
IComponentData(marker interface)Unmanaged struct components
IBufferElementData(marker interface)Dynamic buffer elements
DynamicBuffer<T>Add, RemoveAt, Length, Clear, AsNativeArrayVariable-length per-entity arrays
IJobEntityExecute(ref T1, in T2,...)Auto-generated query from params
IJobChunkExecute(in ArchetypeChunk,...)Manual chunk iteration
WorldDefaultGameObjectInjectionWorld, EntityManagerContainer for systems + entities
RefRW<T> / RefRO<T>ValueRW / ValueRORead-write / read-only component refs

Related Skills

  • unity-scripting -- MonoBehaviour scripting, coroutines, async/await
  • unity-physics -- Physics engine, Rigidbody, colliders (for Unity Physics ECS package)
  • unity-foundations -- GameObjects, Transforms, Scenes, Prefabs

Additional Resources

平台分布

Codex

39.75%
按下载量换算41

Claude

27.12%
按下载量换算28

Cursor

20.81%
按下载量换算21

Gemini CLI

10.01%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills