SDKのセットアップ
このセクションでは、Game Engine 向けのSDK、GS2 SDK for Unity もしくは GS2 SDK for Unreal Engine 5 のインストール手順について詳述しています。
GS2 SDK for Unityのインストール手順
GS2 SDK for Unity Installer Version 2024.4.1
上記のリンクよりUnityPackege形式のインストーラーをダウンロードします。
新規で Unity プロジェクトを作成するか、既存の Unity プロジェクトを準備し、Unity Editor で開きます。
メニューの 『Assets > Import Package > Custum Packages…』 から gs2-unity-installer_2024.4.1.unitypackage ファイルをインポートします。

Unity Editor のメニューから 『Window > Game Server Services > SDK Installer』 を選択します。

SDK インストーラーのウィンドウが表示されます。『Install』を選択します。

インストールが完了すると、プロジェクトの『Packeges』にSDKがインストールされ、Package Managerでインストールされていることが確認できます。

GS2 SDK for Unity は GS2-CSharp-SDK と GS2 SDK for Unity で構成されています、
インストール完了後、正しく動作しない場合は、一度 Unity Editor を再起動してみてください。
GS2 UIKit for Unityのインストール手順

Unity Editor のメニューから 『Window > Game Server Services > UIKit for Unity Installer』 を選択します。

インストールが完了すると、プロジェクトの『Packeges』にSDKがインストールされ、Package Managerでインストールされていることが確認できます。

インストール完了後、正しく動作しない場合は、一度 Unity Editor を再起動してみてください。
GS2 SDK for Unreal Engine 5 のインストール手順
プロジェクトプラグインとしてインストール
新規で Unreal プロジェクトを作成するか、既存の Unreal プロジェクトを準備します。
GitHubの GS2 SDK for Unreal Engine 5 リポジトリ からソースコードをCloneします。

もしくはZip形式でダウンロードし、任意のフォルダーに展開します。

ソースコード一式を Unreal プロジェクトにコピーします。

Unreal プロジェクト内の以下のフォルダに配置してください。
(Unreal プロジェクト)/Plugins/Gs2Plugin
Plugins フォルダが存在しない場合は新規作成してください。
Plugins フォルダ内に Gs2Plugin
フォルダを作成し、その中にダウンロードしたファイル一式をコピーします。
Unreal Editor で uprojectファイルを起動します。
プラグイン ウィンドウを開き、GS2 プラグインにチェックをつけて有効化します。
Unreal Editor を再起動してください。

GS2プラグインのビルドを確認するダイアログが表示されますので、「はい」 を選びます。

環境によりますが、ビルドには相応の時間がかかります。
プラグインのビルドに成功すると Unreal Editorが起動します。
以上でインストールは完了です。
エンジンプラグインとしてインストール
Unreal EngineソースコードをGithubもしくはPerforceから取得し、Engineをビルドしている環境に エンジンプラグインとしてインストールが可能です。
GitHubの GS2 SDK for Unreal Engine 5 リポジトリ からソースコードをCloneします。

もしくはZip形式でダウンロードし、任意のフォルダーに展開します。

Unreal Engineソースコード内に以下のフォルダを作成し、フォルダ内にダウンロードしたソースコード一式をコピーしてください。
(Unreal Engineソースコード)/Engine/Plugins/Gs2Plugin

GenerateProjectFiles.batを実行して プロジェクト ファイルを更新します。
UE5.sln ファイルを開き、Unreal Engineをビルドします。
ビルドが完了したら UnrealEditorを起動し、GS2プラグインを有効化後、UnrealEditorを再起動してください。

以上でインストールは完了です。