# 使用の準備

> Install and set up the Authentication Software Development Kit for Unreal Engine.

Unreal Engine 用 Authentication SDK は、Unreal Engine 用 Unity Gaming Services SDK プラグインの一部です。Unreal Engine 内で Unity Authentication を使用するには、まず Unity Gaming Services SDK をインストールする必要があります。

### 要件を把握する##understand-the-requirements

Unreal Engine 用 Authentication SDK プラグインは、Unreal Engine バージョン 4.27 から 5.3 までをサポートしています。

## Authentication SDK をダウンロードする##download-the-authentication-sdk

### Unreal Engine Marketplace ウェブサイトから##from-the-unreal-engine-marketplace-website

1. [Unreal Engine Marketplace](https://www.unrealengine.com/marketplace/en-US/store) にサインインします。

2. [Unity Gaming Services SDK for Unreal Engine Marketplace ページ](https://www.unrealengine.com/marketplace/en-US/product/unity-gaming-services-sdk-for-unreal-engine) にアクセスします。


   **Unity Gaming Services SDK for Unreal Engine Marketplace ページ:**
   ![Unity Gaming Services SDK for Unreal Engine Marketplace ページ](/api/media?file=/authentication-unreal/media/images/unreal-ugs-marketplace-page.png)

3. **Open in Launcher** (ランチャーで開く) を選択します。

4. [Epic Games Launcher から](./get-started.md#from-the-epic-games-launcher) のステップ 4 までスキップします。

### Epic Games Launcher から##from-the-epic-games-launcher

1. Epic Games Launcher にサインインします。
2. Epic Games Launcher で、**Unity Gaming Services SDK for Unreal Engine** (Unreal Engine 用 Unity Gaming Services SDK) を検索します。


   **Unity Gaming Services SDK for Unreal Engine を検索します:**
   ![Unity Gaming Services SDK for Unreal Engine を検索します](/api/media?file=/authentication-unreal/media/images/unreal-auth-marketplace-search.png)
3. Unity Gaming Services SDK for Unreal Engine ページにアクセスし、**Free** (無料) を選択します。


   **Unity Gaming Services SDK for Unreal Engine Launcher ページ:**
   ![Unity Gaming Services SDK for Unreal Engine Launcher ページ](/api/media?file=/authentication-unreal/media/images/unreal-ugs-epic-launcher-page.png)
4. Epic Games Launcher で **Install to Engine** (エンジンにインストール) を選択します。


   **Unity Gaming Services SDK for Unreal Engine のインストールボタン:**
   ![Unity Gaming Services SDK for Unreal Engine のインストールボタン](/api/media?file=/authentication-unreal/media/images/unreal-ugs-marketplace-install.png)
5. 新しいプロジェクトまたは既存のプロジェクトを開きます。
6. Plugins (プラグイン) ウィンドウに移動し、Unity Gaming Services SDK for Unreal Engine の横のチェックボックスをオンにします。


   **Unity Gaming Services SDK for Unreal Engine プラグインウィンドウ:**
   ![Unity Gaming Services SDK for Unreal Engine プラグインウィンドウ](/api/media?file=/authentication-unreal/media/images/unreal-ugs-engine-plugin.png)
7. Unreal Engine を再起動します。

> **Note:**
>
> **ノート**: ソースからビルドされたバージョンのエンジンを使用する場合は、以下の手順で Marketplace フォルダーにアクセスできます。
>
> * Windows の場合、デフォルトパスは `C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace` です。MacOS と Linux でも同様のパスが使用されます。
> * `UnityGamingServicesSDK` フォルダーをプロジェクトの `Plugins` フォルダーにコピーします。このフォルダーが存在しない場合は、プロジェクトのルートに作成してください。

### Authentication SDK を設定する##configure-the-authentication-sdk

Authentication SDK を使用する前に、Unity Gaming Services にサインアップしてプロジェクトを登録する必要があります。

### UGS にサインアップする##sign-up-for-ugs

> **Note:**
>
> **ノート**: すでに Unity Gaming Services にサインアップし、プロジェクトを登録している場合は、このステップをスキップしてください。

Unity アカウントをお持ちでない場合は、アカウントを作成し、[新しいプロジェクトを作成](/authentication.md) してから、Unity Gaming Services にサインアップしてください。

1. [Unity Dashboard](https://cloud.unity.com/) にサインインします。
2. サイドパネルの **Explore Services** (サービスを探す) を選択します。
3. 上部のバナーの **Sign Up** (サインアップ) を選択し、その後の指示に従います。

### プロジェクトのリンク##link-your-project

1. [Unity Dashboard](https://cloud.unity.com/) にサインインします。
2. ヘッダーでプロジェクト名の横にある歯車アイコンを選択して、プロジェクトの設定にアクセスします。


   **プロジェクト設定の歯車アイコン。:**
   ![プロジェクト設定の歯車アイコン。](/api/media?file=/authentication-unreal/media/images/unreal-auth-project-settings.png)
3. **General** (全般) > **Project Details** (プロジェクト詳細) に Project ID (プロジェクト ID) フィールドがあります。この値をコピーします。


   **プロジェクト ID のコピーボタン。:**
   ![プロジェクト ID のコピーボタン。](/api/media?file=/authentication-unreal/media/images/unreal-auth-project-id.png)
4. Unreal Engine エディターで、**Edit** (編集) > **Project Settings** (プロジェクト設定) > **Plugins** (プラグイン) > **Unity Authentication** > **Unity Project Settings** (Unity プロジェクト設定) に移動します。
5. コピーした値を **Unity Project ID** (Unity プロジェクト ID) フィールドに貼り付けます。
6. Unity Environment を取得します。これは、Authentication SDK と相互作用させたい特定の環境を指定するためのオプションのパラメーターです。
7. Unity Dashboard で、**Environments** (環境) > **Your Environments** (自分の環境) に移動し、使用する環境を選択してその名前をコピーします。これは環境の識別子として使用されます。


   **Unity Dashboard の環境リスト。:**
   ![Unity Dashboard の環境リスト。](/api/media?file=/authentication-unreal/media/images/unreal-auth-your-environments.png)
   > **Note:**
   >
   > **ノート**: 環境 ID ではなく、環境の名前をコピーしてください。上記の例の場合、"testenv" が名前です。他の値を使用すると、Authentication リクエストが失敗します。
8. Unreal Engine エディターで、**Edit** (編集) > **Project Settings** (プロジェクト設定) > **Plugins** (プラグイン) > **Unity Authentication** > **Unity Project Settings** (Unity プロジェクト設定) に移動します。
9. コピーした値を **Unity Environment Name** (Unity 環境名) フィールドに貼り付けます。

両方のフィールドをコピーすると、Unreal エディターのプロジェクト設定は以下のようになります。


**Unity Authentication プラグイン。:**
![Unity Authentication プラグイン。](/api/media?file=/authentication-unreal/media/images/unreal-sdk-plugins-unity-authentication.png)

**Default Player Profile Name** (デフォルトのプレイヤープロファイル名) フィールドでは、デフォルトの Authentication プレイヤープロファイルに別の名前を付けることができます。この名前はそのままにしておいてもよいですし、必要であればカスタマイズしてもかまいません。

> **Note:**
>
> **ノート**: 有効なプレイヤープロファイル名は、文字数が 1 - 30 文字で、英数字 (a-z, A-Z, 0-9)、ハイフン (-)、アンダースコア (\_) を使用し、スペースを含まない名前です。

プレイヤープロファイルの詳細については、Authentication SDK 内の [Player Profiles](./player-profiles.md) を参照してください。

## 次のステップ##what's-next?

次のいずれかのインテグレーションに進んでください。

* [C++ インテグレーション](./cpp-integration.md)
* [Blueprint インテグレーション](./blueprint-integration.md)
