unity-development
БесплатноБез исполняемых скриптовНе проверенUnity 6 reference patterns: an architecture decision tree, render pipeline and Addressables migration recipes, Input System patterns, a DOTS quick reference…
от HermeticOrmus★ 83 звезды на GitHubОб этом скилле
Unity development pattern library
Reference patterns for Unity 6 development. Use as lookup.
Architecture decision tree
Project type: 2D? 3D? Mixed?
Pick Render Pipeline: URP (most), HDRP (high-end), Built-in (legacy maintenance only)
Entity count at peak: < 100? 100-1000? > 1000?
< 100: MonoBehaviour everywhere
100-1000: MonoBehaviour with pooling
> 1000: Consider ECS/DOTS — does team have experience?
Multiplayer?
No: skip
Cooperative / co-op: Netcode for GameObjects (current Unity recommendation)
Competitive < 16 players: Netcode for GameObjects or Mirror
Competitive 16+ players: dedicated server architecture, possibly DOTS for sim
Platform mix:
PC only: easiest, no compromise
PC + mobile: bake compromises in early (texture sizes, shader complexity)
Console: budget for cert (3+ months); platform-specific work isolated to per-platform modules
WebGL: GC pauses are devastating; profile early
Render Pipeline migration recipes
Built-in → URP
- Install URP via Package Manager
- Create URP Asset (right-click → Create → Rendering → URP Asset)
- Project Settings → Graphics → Scriptable Render Pipeline Settings: drag URP Asset
- Window → Rendering → Render Pipeline Converter (Unity 6 has automated converter)
- Migrate custom shaders to Shader Graph or rewrite as URP-compatible HLSL
- Verify post-processing — old PostProcessing Stack v2 replaced by URP Volume system
Built-in → HDRP
Heavier lift. Materials rebuild, lighting re-bake, custom shaders rewritten. Allocate weeks for a small project, months for a large one.
Custom shader patterns
// URP unlit shader skeleton
Shader "Custom/MyUnlit"
{
Properties { _MainTex ("Texture", 2D) = "white" {} }
SubShader
{
Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" }
Pass
{
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
struct Attributes { float4 positionOS : POSITION; float2 uv : TEXCOORD0; };
struct Varyings { float4 positionHCS : SV_POSITION; float2 uv : TEXCOORD0; };
Varyings vert(Attributes IN) {
Varyings OUT;
OUT.positionHCS = TransformObjectToHClip(IN.positionOS.xyz);
OUT.uv = IN.uv;
return OUT;
}
half4 frag(Varyings IN) : SV_Target { return tex2D(_MainTex, IN.uv); }
ENDHLSL
}
}
}
Addressables migration recipe
// Old (Resources)
GameObject prefab = Resources.Load<GameObject>("Enemies/Drone");
GameObject instance = Instantiate(prefab);
// New (Addressables, async)
[SerializeField] private AssetReference droneRef;
private async void SpawnDrone()
{
GameObject prefab = await droneRef.LoadAssetAsync<GameObject>().Task;
GameObject instance = Instantiate(prefab);
// Track instance for later Addressables.Release
}
// New (Addressables, by key)
private async void SpawnByKey()
{
GameObject prefab = await Addressables.LoadAssetAsync<GameObject>("Drone").Task;
GameObject instance = Instantiate(prefab);
}
Always pair LoadAssetAsync with Release. Without release, the asset stays in memory.
Input System patterns
Pattern: PlayerInput component
[RequireComponent(typeof(PlayerInput))]
public class Player : MonoBehaviour
{
private PlayerInput _input;
private InputAction _move;
private void Awake()
{
_input = GetComponent<PlayerInput>();
_move = _input.actions["Move"];
}
private void OnEnable() { _move.performed += OnMove; }
private void OnDisable() { _move.performed -= OnMove; }
private void OnMove(InputAction.CallbackContext ctx) { /* ... */ }
}
Pattern: InputActionAsset reference
[SerializeField] private InputActionAsset inputActions;
private InputAction _move;
private void OnEnable()
{
_move = inputActions.FindAction("Player/Move");
_move.Enable();
}
Pattern: Runtime rebinding
private void StartRebinding(InputAction action, int bindingIndex)
{
action.Disable();
action.PerformInteractiveRebinding(bindingIndex)
.OnComplete(operation =>
{
action.Enable();
operation.Dispose();
})
.Start();
}
DOTS / ECS quick reference
// Define a component
public struct Velocity : IComponentData { public float3 Value; }
// Define a system
public partial struct MovementSystem : ISystem
{
public void OnUpdate(ref SystemState state)
{
float deltaTime = SystemAPI.Time.DeltaTime;
foreach (var (transform, velocity) in SystemAPI.Query<RefRW<LocalTransform>, RefRO<Velocity>>())
{
transform.ValueRW.Position += velocity.ValueRO.Value * deltaTime;
}
}
}
DOTS pays off when:
- 1000+ entities updating
Установить unity-development в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл unity-development?
Unity 6 reference patterns: an architecture decision tree, render pipeline and Addressables migration recipes, Input System patterns, a DOTS quick reference, a common mistakes catalog, component and ScriptableObject event channel patterns, and a generic object pool. Use when designing, writing, or reviewing Unity C#.
Как установить скилл unity-development?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл unity-development запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic