> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diversion.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Unreal Engine プラグイン

> Unreal Engine エディターを離れずに Diversion を使用する

ソースコントロールを使いたいけれど、複数のソフトウェアをインストールして使う手間を避けたい、そして Unreal Engine を使っている、というあなたのためのものです。

<Note>
  Unreal Engine 5.8 のサポートは現在 **Windows と Mac のみ** に限定されています。UE 5.8 では Linux はまだサポートされていません。
</Note>

## インストール

### 前提条件

プラグインをインストールする前に、Diversion をインストールしてサインインしておく必要があります。まだの場合は [クイックスタート](/ja/quickstart) ガイドを参照してください。

### プラグインのインストール

[//]: #

[//]: # "<Steps>"

[//]: # "    <Step title=\"Download the plugin\">"

[//]: # "    Download the plugin for your Unreal Engine version:"

[//]: # "    - Unreal Engine 5.3: [https://get.diversion.dev/ue-plugin/Diversion-v0.1.4-ue5.3.zip](https://get.diversion.dev/ue-plugin/Diversion-v0.1.4-ue5.3.zip)."

[//]: # "    - Unreal Engine 5.4: [https://get.diversion.dev/ue-plugin/Diversion-v0.1.4-ue5.4.zip](https://get.diversion.dev/ue-plugin/Diversion-v0.1.4-ue5.4.zip)."

[//]: # "    </Step>"

[//]: # "    <Step title=\"Copy the plugin\">"

[//]: # "    Unzip it, and copy the `Diversion` folder (the folder and all of its contents, not just the folder) into the `Marketplace` folder inside Unreal Engine's `Plugins` folder. Depending on your engine's version and where you installed it, it should look something like this: `C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace`."

[//]: # "    Create the `Marketplace` folder in case it doesn't exist."

[//]: # "    </Step>"

[//]: # "</Steps>"

[//]: # "The plugin will also be available in the Unreal Engine Marketplace in the near future."

<Steps>
  <Step title="FAB からプラグインを入手する">
    <a href="https://www.fab.com/listings/59d591f2-4026-4e8f-9128-9c8ef1ff9bab">Fab マーケットプレイス</a> で `Diversion` を検索し、
    `Add to My Library` ボタンをクリックしてアカウントにプラグインを追加します。

    <img alt="FAB でライブラリにプラグインを追加" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-add-to-library.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=306b1d9f00ea4d6cd50fa8ac41f7b386" width="403" height="140" data-path="images/unreal-plugin-add-to-library.png" />

    次に、`Download` ボタンをクリックし、`Epic Games Launcher` リンクをクリックしてエンジンアセットライブラリに移動します。

    <img alt="ダウンロードしてランチャーで開く" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-open-launcher.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=765b0231f35ef66e5ae6fa69f8eb6e73" width="624" height="335" data-path="images/unreal-plugin-open-launcher.png" />

    あるいは、単純に <a href="com.epicgames.launcher://ue/library">こちらをクリックして Epic Games Launcher を開く</a> こともできます。

    <Note>
      プラグインは FAB 経由でダウンロードされますが、**Epic Games Launcher からインストール** する必要があります。FAB でライブラリに追加した後、インストールを完了するにはランチャーに切り替える必要があります（次のステップ）。
    </Note>
  </Step>

  <Step title="Epic Games Launcher からプラグインをインストールする">
    Epic Games Launcher を開き、エンジンアセットライブラリ（`Library` > `Fab Library`）に移動します。下部で Diversion プラグインを見つけ、`Install to Engine` をクリックします。

    <img alt="ランチャーからプラグインをインストール" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-install-to-engine.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=2ba1dc31bd4e8ed2a99cf5c41b874845" width="331" height="93" data-path="images/unreal-plugin-install-to-engine.png" />

    プラグインをインストールしたい Unreal Engine の正しいバージョンを選択し、`Install` をクリックします。

    <img alt="エンジンバージョンを選択してインストール" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/tNxAwm8NrThaCp35/images/install-diversion-plugin.png?fit=max&auto=format&n=tNxAwm8NrThaCp35&q=85&s=e1c3355fd1be7605d8e9a87d33a5c84d" width="686" height="143" data-path="images/install-diversion-plugin.png" />
  </Step>

  <Step title="代替: ソースからプラグインをビルドする">
    マーケットプレイスからダウンロードする代わりに、UE プロジェクトにプラグインを手動で追加したい場合は、
    以下のリンクからソースコードを入手できます:

    * Unreal Engine 5.3: [Diversion-v2.0.19-ue5.3.0.zip](https://get.diversion.dev/ue-plugin/Diversion-v2.0.19-ue5.3.0-nobin.zip)
    * Unreal Engine 5.4: [Diversion-v2.0.19-ue5.4.0.zip](https://get.diversion.dev/ue-plugin/Diversion-v2.0.19-ue5.4.0-nobin.zip)
    * Unreal Engine 5.5: [Diversion-v2.0.19-ue5.5.0.zip](https://get.diversion.dev/ue-plugin/Diversion-v2.0.19-ue5.5.0-nobin.zip)
    * Unreal Engine 5.6: [Diversion-v2.0.19-ue5.6.0.zip](https://get.diversion.dev/ue-plugin/Diversion-v2.0.19-ue5.6.0-nobin.zip)
    * Unreal Engine 5.7: [Diversion-v2.0.19-ue5.7.0.zip](https://get.diversion.dev/ue-plugin/Diversion-v2.0.19-ue5.7.0-nobin.zip)
    * Unreal Engine 5.8（Windows/Mac のみ）: [Diversion-v2.0.19-ue5.8.0.zip](https://get.diversion.dev/ue-plugin/Diversion-v2.0.19-ue5.8.0-nobin.zip)

    <Card title="警告！" icon="triangle-exclamation" iconType="duotone" color="#ca8b04">
      このオプションを選択すると、プラグインをソースからビルドし、最新機能や改善に追従するためにバージョンを手動でメンテナンスする必要があります。
    </Card>
  </Step>
</Steps>

## 設定

プラグインをインストールしたら、Diversion をソースコントロールプロバイダーとして使用するために、プロジェクトごとに設定する必要があります。

<Steps>
  <Step title="プラグインを有効化する">
    エディターで `Edit` > `Plugins` に移動します。`Diversion` を検索し、チェックボックスをクリックしてプラグインを有効化します。エディターの再起動を求められた場合は、再起動してください。

    <img alt="プラグインを有効化" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/tgHOXPild1lTdU_m/images/enable-diversion-plugin.png?fit=max&auto=format&n=tgHOXPild1lTdU_m&q=85&s=1e41059754a53ef1e62edb1305d19948" width="1566" height="896" data-path="images/enable-diversion-plugin.png" />
  </Step>

  <Step title="リビジョンコントロールを有効化する">
    プラグインが有効になった状態で、右下の `Revision Control -> Connect to Revision Control` をクリックします。

    <img alt="Revision Control ボタン" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-engine-revision-control-button.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=ffa45d6293cc2107bd4de7041b736ae9" width="285" height="162" data-path="images/unreal-engine-revision-control-button.png" />
  </Step>

  <Step title="プロバイダーを選択する">
    表示されるウィンドウで、プロバイダーのドロップダウンリストから `Diversion` を選択します。

    <img alt="Diversion プロバイダーを選択" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-choose-provider.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=cd81abae76294986b8ee5fa254cfab20" width="502" height="221" data-path="images/unreal-plugin-choose-provider.png" />
  </Step>

  <Step title="Diversion にログインしていることを確認する">
    ログインしていないと次のステップは機能しません。方法が分からない場合は [クイックスタート](/ja/quickstart) を参照してください。
  </Step>

  <Step title="Diversion のリビジョンコントロールをセットアップする">
    <Accordion title="新しいリポジトリを作成したい">
      プロジェクトフォルダーが Diversion リポジトリでない場合、初期化を促されます。

      <Note>
        Unreal Engine が `.uproject` ファイルのあるフォルダーから開かれていることを確認してください。ここにリポジトリが作成されます。
      </Note>

      `Initialize project with Diversion` をクリックすると、プラグインが残りを処理します。何も起こっていないように見える場合は、ログイン状態を確認し、プロバイダーのドロップダウンリストから Diversion を再選択してみてください。
      プラグインはリポジトリのルートと Diversion のインストールを認識します。

      <img alt="リポジトリを初期化" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-diversion-plugin-initialize-repository.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=974d829311ac053693a9a6e6057ac1fe" width="574" height="284" data-path="images/unreal-diversion-plugin-initialize-repository.png" />

      初期化後、次の画面が表示されます。

      <img alt="初期化されたリポジトリ" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-diversion-plugin-initialized-repository.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=2940b5de59d9192c9ef4d83d170ee8af" width="518" height="218" data-path="images/unreal-diversion-plugin-initialized-repository.png" />

      `Accept Settings` をクリックすれば準備完了です！
    </Accordion>

    <Accordion title="既存のリポジトリに接続する">
      プロジェクトが既に Diversion リポジトリの場合（例: リポジトリのクローン時）は、`Accept Settings` をクリックするだけで準備完了です！

      <img alt="初期化されたリポジトリ" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-diversion-plugin-initialized-repository.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=2940b5de59d9192c9ef4d83d170ee8af" width="518" height="218" data-path="images/unreal-diversion-plugin-initialized-repository.png" />
    </Accordion>
  </Step>
</Steps>

## 使い方

プラグインを使った一般的なワークフローを見ていきましょう。

ここでは、プラグインがすでにインストール・設定されたクリーンな Unreal プロジェクトを使用します。

### 変更を加える

このプロジェクトは、いずれ Multiplayer Open World Survival RPG With Crafting and Building Mechanics™ になります。

そのためには、キャラクターが必要です。作成しましょう。`Content Browser` で右クリックして `Blueprint Class` を選択します。

表示されるウィンドウで、`Character` を選択して `MyCharacter` と名付けます。

新しいファイルが見慣れないものに見えるかもしれません。黄色のクエスチョンマークが付いています。これは、Unreal Engine がファイルをメモリ内に作成したばかりで、まだディスクに保存していないため、Diversion がそれを認識していないからです。

<img alt="キャラクターを作成" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-my-character-created.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=bd366fa348634d66697d82d0a3833a7d" width="269" height="318" data-path="images/unreal-plugin-my-character-created.png" />

修正しましょう。ファイルをダブルクリックして開き、左上の `Save` ボタンをクリックします。あるいは、Content Browser でファイルを選択した状態で `Ctrl + S` を押して保存することもできます。

クエスチョンマークがなくなり、代わりに緑のプラス記号が表示されます。これは、ファイルが Diversion によって追跡され、新しく追加されたファイルとして認識されたことを意味します。

<img alt="キャラクターを保存" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-my-character-saved.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=6c8f69d4332b86945798a284f95a9bb4" width="301" height="340" data-path="images/unreal-plugin-my-character-saved.png" />

### 変更をコミットする

この変更をリポジトリに保存して、バックアップしたり、チームと共有できるようにしたいと思います。

右下の `Revision Control` ボタンを再度クリックし、`Submit Content` をクリックします。

<img alt="Submit Content" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-engine-revision-control-submit-changes-button.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=802dad16af0a5abce7b57d418b067d71" width="271" height="160" data-path="images/unreal-engine-revision-control-submit-changes-button.png" />

表示されるウィンドウには、前回のコミットから変更されたすべてのファイルのリストが表示されます。この場合、緑のプラス記号が付いた `MyCharacter` が表示されます。`.uproject` ファイルも表示されます。Diversion がこれも新しいファイルとして認識しているためです。

`Changelist Description` というラベルのテキストボックスに、コミットする変更の簡単な説明を書きます。この場合、`Added MyCharacter` と書けます。

<img alt="Changelist description" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-changelist-description.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=ec254fadbab181e98776e3cbdf824e56" width="622" height="457" data-path="images/unreal-plugin-changelist-description.png" />

<Card title="警告！" icon="triangle-exclamation" iconType="duotone" color="#ca8b04">
  Diversion は、あいまい、不明瞭、または簡潔すぎるコミットメッセージの使用を推奨しません。これはあくまでデモ用です。意味のあるコミットメッセージを書いてください。
</Card>

`Submit` ボタンをクリックすると、`MyCharacter` の緑のプラス記号が消え、Diversion がファイルをコミットしたことを意味します。

<img alt="キャラクターをコミット" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-my-character-committed.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=02a7dff4d9c679c9a8b225f043a2fc32" width="288" height="333" data-path="images/unreal-plugin-my-character-committed.png" />

### Web UI で確認する

ブラウザを開き、[ダッシュボード](https://app.diversion.dev) に移動します。リポジトリを選択します（**Remote Repositories** タブの `View` ボタン、または左上のリポジトリセレクター経由）。プロジェクトのフォルダーと同じ名前になっているはずです。

先ほど作成したコミットと、書いた説明、追加したファイルが表示されます。左のナビゲーションレールから **Commits** ビューを開いてコミットを確認します。

<img alt="コミット一覧" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/UZ43CqMpCXHHcPfk/images/unreal-plugin-commit-list-in-browser.png?fit=max&auto=format&n=UZ43CqMpCXHHcPfk&q=85&s=eb8f42bac08084f7c9e173fafcf2248d" width="808" height="405" data-path="images/unreal-plugin-commit-list-in-browser.png" />

### もう一度変更を加える

今のキャラクターは空のコライダーだけなので、見えるようにプレースホルダーのメッシュを追加しましょう。

`MyCharacter` ブループリントで、左上の `Add Component` ボタンをクリックし、`Cube` を検索して追加します。これで、キャラクターが見えるようになりました。

<img alt="キャラクターのキューブ" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-add-cube-component.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=be135a629699edba3ee2305f17787509" width="284" height="212" data-path="images/unreal-plugin-add-cube-component.png" />

しかし、キャラクターは何もしません。キャラクターの `Event Graph` で、`Print String` ノードを追加し、`Event Begin Play` ノードに接続します。これで、キャラクターに基本的な機能が追加されました。

<img alt="キャラクターの Print" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-add-print-begin-play.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=8b1aa57ac4eb4b74d15be9ee4b23266a" width="622" height="294" data-path="images/unreal-plugin-add-print-begin-play.png" />

コンパイルしてファイルを保存します。`Content Browser` を開くと、`MyCharacter` の隣に赤いチェックマークが表示されているのが分かります。これは、Diversion がファイルの変更を認識したことを意味します。

<img alt="キャラクターの変更" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-my-character-modified.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=bb851e7e73045c39011ee1687a56e486" width="286" height="328" data-path="images/unreal-plugin-my-character-modified.png" />

### もう一度コミットする

前回と同様、右下の `Revision Control` ボタンをクリックし、`Submit Content` をクリックします。
`MyCharacter` ファイルの隣に赤いチェックマークが付いた状態が表示されます。

<img alt="Changelist description 2" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-changelist-description-2.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=1169f7de20e438f314374c18d47a03d2" width="629" height="457" data-path="images/unreal-plugin-changelist-description-2.png" />

ファイルをダブルクリックして、Unreal の diff ツールで加えた変更を確認します。

このウィンドウでは、右側の自分のリビジョンと、左側の最後にコミットされたリビジョンの差分を確認できます。左側のリストに `Event Graph` というエントリが表示されるはずです。
それをクリックすると、ブループリントに加えた変更が表示され、追加した `Print String` ノードが見えるはずです。

<img alt="ブループリント diff ツール" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/images/unreal-plugin-bp-difftool.png?fit=max&auto=format&n=HhHa-PhS49hu7GIa&q=85&s=67fb94b8b5b49a3317cf27c420f10b52" width="2568" height="1440" data-path="images/unreal-plugin-bp-difftool.png" />

作業内容を確認したら、再度コミットする変更の説明を書きます。この場合、`Adding placeholder mesh and basic functionality to MyCharacter` と書けます。

`Submit` ボタンをクリックすると、赤いチェックマークが消え、Diversion がファイルをコミットしたことを意味します。

### ソフトロック警告を無効にする

Diversion のソフトロック機能は、ファイルが他のチームメンバーによって編集中であることを警告し、潜在的なマージ競合の回避に役立ちます。他の人が作業中のファイルを開こうとすると、警告メッセージが表示されます。

これらの警告を無効にしたい場合は、次の手順に従います:

<Steps>
  <Step title="プロジェクト設定を開く">
    上部のメニューバーで `Edit` をクリックし、`Project Settings` を選択します。

    <img alt="プロジェクト設定を選択" src="https://mintcdn.com/diversion-2/ai4kqKiZ3HX_quvc/images/unreal-project-settings.png?fit=max&auto=format&n=ai4kqKiZ3HX_quvc&q=85&s=8e33c589cca2e45bb3bb623334e242b7" width="480" height="329" data-path="images/unreal-project-settings.png" />
  </Step>

  <Step title="ソフトロック確認を無効にする">
    「soft lock」を検索し、`Enable Diversion Auto Soft Lock Confirmations` フィールドの **チェックを外します**。

    <img alt="Unreal でソフトロックを無効にする" src="https://mintcdn.com/diversion-2/QuoGq8WKvsiDjWZD/images/disable-soft-lock-unreal.png?fit=max&auto=format&n=QuoGq8WKvsiDjWZD&q=85&s=f2c2c1b1ef00132f3c2b754e7346af8e" width="2147" height="352" data-path="images/disable-soft-lock-unreal.png" />
  </Step>

  <Step title="変更を適用する">
    設定ウィンドウを閉じ、変更を反映させるためにエディターを再起動します。
  </Step>
</Steps>

<Note>
  **重要:** ソフトロック警告を無効にすると、プロジェクトの構成ファイルが変更されます。この変更をリポジトリにコミットすると、チーム全体に影響します。チーム全体の設定ではなく個人的な設定にしたい場合は、この構成ファイルをコミットしないか、[無視リスト](/ja/basic/dvignore) に追加することを検討してください。
</Note>
