jpskill.com
🛠️ 開発・MCP コミュニティ

unity

Unityのエキスパートとして、C#やコンポーネントシステム、URPなどを活用し、2D/3D/AR/VRゲームを開発、iOSやAndroidなど多様なプラットフォームへ展開できるよう支援するSkill。

📜 元の英語説明(参考)

You are an expert in Unity, the most widely-used game engine for indie and mobile game development. You help developers build 2D, 3D, AR, and VR games using C#, Unity's component system, DOTS/ECS for high-performance, Universal Render Pipeline (URP), UI Toolkit, Addressables for asset management, and export to 20+ platforms including iOS, Android, PC, consoles, WebGL, and VR headsets.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Unityのエキスパートとして、C#やコンポーネントシステム、URPなどを活用し、2D/3D/AR/VRゲームを開発、iOSやAndroidなど多様なプラットフォームへ展開できるよう支援するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o unity.zip https://jpskill.com/download/15516.zip && unzip -o unity.zip && rm unity.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15516.zip -OutFile "$d\unity.zip"; Expand-Archive "$d\unity.zip" -DestinationPath $d -Force; ri "$d\unity.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して unity.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → unity フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Unity — クロスプラットフォームゲームエンジン

あなたは、インディーゲームやモバイルゲーム開発で最も広く使用されているゲームエンジンである Unity の専門家です。C#、Unity のコンポーネントシステム、ハイパフォーマンスのための DOTS/ECS、Universal Render Pipeline (URP)、UI Toolkit、アセット管理のための Addressables を使用して、2D、3D、AR、VR ゲームを構築し、iOS、Android、PC、コンソール、WebGL、VR ヘッドセットを含む20以上のプラットフォームにエクスポートするのを支援します。

主要な機能

コンポーネントシステム

// PlayerController.cs — MonoBehaviour コンポーネント
using UnityEngine;

public class PlayerController : MonoBehaviour
{
    [Header("Movement")]
    [SerializeField] private float moveSpeed = 7f;      // Inspector で編集可能
    [SerializeField] private float jumpForce = 12f;
    [SerializeField] private float gravity = -25f;

    [Header("Ground Check")]
    [SerializeField] private Transform groundCheck;
    [SerializeField] private float groundDistance = 0.2f;
    [SerializeField] private LayerMask groundMask;

    private CharacterController controller;
    private Vector3 velocity;
    private bool isGrounded;
    private Animator animator;
    private static readonly int IsRunning = Animator.StringToHash("IsRunning");
    private static readonly int IsJumping = Animator.StringToHash("IsJumping");

    private void Start()
    {
        controller = GetComponent<CharacterController>();
        animator = GetComponent<Animator>();
    }

    private void Update()
    {
        // 接地判定
        isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);
        if (isGrounded && velocity.y < 0)
            velocity.y = -2f;                // 地面に張り付く

        // 移動入力
        float x = Input.GetAxis("Horizontal");
        float z = Input.GetAxis("Vertical");
        Vector3 move = transform.right * x + transform.forward * z;
        controller.Move(move * (moveSpeed * Time.deltaTime));

        // アニメーション
        bool moving = move.magnitude > 0.1f;
        animator.SetBool(IsRunning, moving);

        // ジャンプ
        if (Input.GetButtonDown("Jump") && isGrounded)
        {
            velocity.y = jumpForce;
            animator.SetBool(IsJumping, true);
        }

        // 重力
        velocity.y += gravity * Time.deltaTime;
        controller.Move(velocity * Time.deltaTime);

        if (isGrounded)
            animator.SetBool(IsJumping, false);
    }
}

ScriptableObject (データ駆動型設計)

// WeaponData.cs — データコンテナ (MonoBehaviour ではない)
using UnityEngine;

[CreateAssetMenu(fileName = "NewWeapon", menuName = "Game/Weapon Data")]
public class WeaponData : ScriptableObject
{
    public string weaponName;
    public Sprite icon;
    public GameObject prefab;
    public float damage = 10f;
    public float attackSpeed = 1f;         // 1秒あたりの攻撃回数
    public float range = 2f;
    public AudioClip attackSound;
    public ParticleSystem hitEffect;
    [TextArea] public string description;
}

// 使用法: Project ウィンドウで武器アセットを作成
// Inspector フィールドにドラッグ — 完全にデータ駆動型

イベントとメッセージング

// GameEvents.cs — ScriptableObject を使用したイベントシステム
using UnityEngine;
using UnityEngine.Events;

[CreateAssetMenu(menuName = "Game/Event")]
public class GameEvent : ScriptableObject
{
    private readonly List<GameEventListener> listeners = new();

    public void Raise()
    {
        // すべてのリスナーに逆順で通知 (イテレーション中の削除に安全)
        for (int i = listeners.Count - 1; i >= 0; i--)
            listeners[i].OnEventRaised();
    }

    public void Register(GameEventListener listener) => listeners.Add(listener);
    public void Unregister(GameEventListener listener) => listeners.Remove(listener);
}

// GameEventListener.cs — 任意の GameObject にアタッチ
public class GameEventListener : MonoBehaviour
{
    [SerializeField] private GameEvent gameEvent;
    [SerializeField] private UnityEvent response;

    private void OnEnable() => gameEvent.Register(this);
    private void OnDisable() => gameEvent.Unregister(this);
    public void OnEventRaised() => response.Invoke();
}

Addressables (アセット管理)

// アセットを非同期でロード (Resources フォルダは不要!)
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;

public class LevelLoader : MonoBehaviour
{
    public async void LoadLevel(string levelKey)
    {
        // Addressables から prefab をロード (ローカルまたはリモート CDN)
        AsyncOperationHandle<GameObject> handle =
            Addressables.InstantiateAsync(levelKey);

        await handle.Task;

        if (handle.Status == AsyncOperationStatus.Succeeded)
            Debug.Log($"Loaded level: {levelKey}");
    }

    // CDN からコンテンツアップデートをダウンロード
    public async void CheckForUpdates()
    {
        var checkHandle = Addressables.CheckForCatalogUpdates();
        await checkHandle.Task;

        if (checkHandle.Result.Count > 0)
        {
            var updateHandle = Addressables.UpdateCatalogs(checkHandle.Result);
            await updateHandle.Task;
            Debug.Log("Content updated from server!");
        }
    }
}

インストール

# Unity Hub を https://unity.com/download からダウンロード
# エディターバージョンをインストール (LTS を推奨)
# Personal ライセンス: 無料 (収益 < $200K)
# Plus: $399/年, Pro: $2,040/年

# CLI ビルド (CI/CD)
unity -batchmode -nographics -projectPath ./MyGame \
  -buildTarget StandaloneWindows64 \
  -executeMethod BuildScript.Build

ベストプラクティス

  1. 継承よりもコンポーネント — 小さく、焦点を絞ったコンポーネントから GameObject を構成します。深いクラス階層を構築しないでください。
  2. データには ScriptableObject — 武器、アイテム、アビリティを ScriptableObject アセットとして使用します。デザイナーはコードなしで編集できます。
  3. Resources よりも Addressables — 非同期アセットロードには Addressables を使用します。CDN、DLC、コンテンツアップデートをサポートします。
  4. オブジェクトプーリング — 弾丸、パーティクル、敵をプールします。Instantiate/`
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Unity — Cross-Platform Game Engine

You are an expert in Unity, the most widely-used game engine for indie and mobile game development. You help developers build 2D, 3D, AR, and VR games using C#, Unity's component system, DOTS/ECS for high-performance, Universal Render Pipeline (URP), UI Toolkit, Addressables for asset management, and export to 20+ platforms including iOS, Android, PC, consoles, WebGL, and VR headsets.

Core Capabilities

Component System

// PlayerController.cs — MonoBehaviour component
using UnityEngine;

public class PlayerController : MonoBehaviour
{
    [Header("Movement")]
    [SerializeField] private float moveSpeed = 7f;      // Editable in Inspector
    [SerializeField] private float jumpForce = 12f;
    [SerializeField] private float gravity = -25f;

    [Header("Ground Check")]
    [SerializeField] private Transform groundCheck;
    [SerializeField] private float groundDistance = 0.2f;
    [SerializeField] private LayerMask groundMask;

    private CharacterController controller;
    private Vector3 velocity;
    private bool isGrounded;
    private Animator animator;
    private static readonly int IsRunning = Animator.StringToHash("IsRunning");
    private static readonly int IsJumping = Animator.StringToHash("IsJumping");

    private void Start()
    {
        controller = GetComponent<CharacterController>();
        animator = GetComponent<Animator>();
    }

    private void Update()
    {
        // Ground detection
        isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);
        if (isGrounded && velocity.y < 0)
            velocity.y = -2f;                // Stick to ground

        // Movement input
        float x = Input.GetAxis("Horizontal");
        float z = Input.GetAxis("Vertical");
        Vector3 move = transform.right * x + transform.forward * z;
        controller.Move(move * (moveSpeed * Time.deltaTime));

        // Animation
        bool moving = move.magnitude > 0.1f;
        animator.SetBool(IsRunning, moving);

        // Jump
        if (Input.GetButtonDown("Jump") && isGrounded)
        {
            velocity.y = jumpForce;
            animator.SetBool(IsJumping, true);
        }

        // Gravity
        velocity.y += gravity * Time.deltaTime;
        controller.Move(velocity * Time.deltaTime);

        if (isGrounded)
            animator.SetBool(IsJumping, false);
    }
}

ScriptableObjects (Data-Driven Design)

// WeaponData.cs — Data container (no MonoBehaviour)
using UnityEngine;

[CreateAssetMenu(fileName = "NewWeapon", menuName = "Game/Weapon Data")]
public class WeaponData : ScriptableObject
{
    public string weaponName;
    public Sprite icon;
    public GameObject prefab;
    public float damage = 10f;
    public float attackSpeed = 1f;         // Attacks per second
    public float range = 2f;
    public AudioClip attackSound;
    public ParticleSystem hitEffect;
    [TextArea] public string description;
}

// Usage: create weapon assets in Project window
// Drag into Inspector fields — fully data-driven

Events and Messaging

// GameEvents.cs — Event system using ScriptableObjects
using UnityEngine;
using UnityEngine.Events;

[CreateAssetMenu(menuName = "Game/Event")]
public class GameEvent : ScriptableObject
{
    private readonly List<GameEventListener> listeners = new();

    public void Raise()
    {
        // Notify all listeners in reverse (safe for removal during iteration)
        for (int i = listeners.Count - 1; i >= 0; i--)
            listeners[i].OnEventRaised();
    }

    public void Register(GameEventListener listener) => listeners.Add(listener);
    public void Unregister(GameEventListener listener) => listeners.Remove(listener);
}

// GameEventListener.cs — Attach to any GameObject
public class GameEventListener : MonoBehaviour
{
    [SerializeField] private GameEvent gameEvent;
    [SerializeField] private UnityEvent response;

    private void OnEnable() => gameEvent.Register(this);
    private void OnDisable() => gameEvent.Unregister(this);
    public void OnEventRaised() => response.Invoke();
}

Addressables (Asset Management)

// Load assets asynchronously (no Resources folder!)
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;

public class LevelLoader : MonoBehaviour
{
    public async void LoadLevel(string levelKey)
    {
        // Load prefab from Addressables (local or remote CDN)
        AsyncOperationHandle<GameObject> handle =
            Addressables.InstantiateAsync(levelKey);

        await handle.Task;

        if (handle.Status == AsyncOperationStatus.Succeeded)
            Debug.Log($"Loaded level: {levelKey}");
    }

    // Download content update from CDN
    public async void CheckForUpdates()
    {
        var checkHandle = Addressables.CheckForCatalogUpdates();
        await checkHandle.Task;

        if (checkHandle.Result.Count > 0)
        {
            var updateHandle = Addressables.UpdateCatalogs(checkHandle.Result);
            await updateHandle.Task;
            Debug.Log("Content updated from server!");
        }
    }
}

Installation

# Download Unity Hub from https://unity.com/download
# Install editor version (LTS recommended)
# Personal license: FREE (revenue < $200K)
# Plus: $399/year, Pro: $2,040/year

# CLI builds (CI/CD)
unity -batchmode -nographics -projectPath ./MyGame \
  -buildTarget StandaloneWindows64 \
  -executeMethod BuildScript.Build

Best Practices

  1. Component over inheritance — Compose GameObjects from small, focused components; don't build deep class hierarchies
  2. ScriptableObjects for data — Weapons, items, abilities as ScriptableObject assets; designers edit without code
  3. Addressables over Resources — Use Addressables for async asset loading; supports CDN, DLC, and content updates
  4. Object pooling — Pool bullets, particles, enemies; Instantiate/Destroy causes GC spikes
  5. URP for performance — Use Universal Render Pipeline for mobile/VR; HDRP for high-end PC/console
  6. Assembly definitions — Split code into assemblies; reduces recompile time from 30s to 2s
  7. Events for decoupling — Use ScriptableObject events or C# events; avoid direct references between systems
  8. Profile always — Use Unity Profiler and Frame Debugger; test on target hardware early and often