設定インジェクション
注釈:本資料はAI技術を用いて翻訳されています。
はじめに
AccelByte Gaming Services (AGS) では、設定インジェクションを使用して、ゲームの実行呼び出し時に SDK と OAuth の設定を上書きできます。設定インジェクションは複数の上書きコマンドに対応しています。
設定を上書きしても、SDK 設定ファイルの値は変更されません。上書きコマンドで宣言された値のみが上書きされ、他の設定値はそのまま保持されます。
上書きコマンド
SDK と OAuth の設定をインジェクションするには、次の例のように -AB<Config_Name> <Config_Value> コマンドを使用します。
- Unreal
- Unity
バイナリを実行する前に、コマンドをコマンドライン引数として設定します。
GameExecutable -ABIamServerUrl "https://dev.accelbyte.io/iam" -ABMatchmakingServerUrl "https://dev.accelbyte.io/matchmaking" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
AGS 3.78 のリリース以降、等号 (=) も使用できます。
GameExecutable -ABIamServerUrl="https://dev.accelbyte.io/iam" -ABMatchmakingServerUrl="https://dev.accelbyte.io/matchmaking" -ABClientId="YourClientId" -ABClientSecret="YourClientSecret"
設定インジェクションを適用する際は、以下の点に注意してください。
- このインジェクションは、クライアントとサーバーの両方の設定に影響します。
Config_Nameは大文字と小文字を区別しません。Config_Valueのブール値を空のままにすると、自動的にtrueに設定されます。
- Editor
- Executable
プロジェクトを開始する前に、Unity Hub からプロジェクトの引数を設定します。
-ABIamServerUrl "https://dev.accelbyte.io/iam" -ABMatchmakingServerUrl "https://dev.accelbyte.io/matchmaking" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
バイナリを実行する前に、コマンドをコマンドライン引数として設定します。
GameExecutable -ABIamServerUrl "https://dev.accelbyte.io/iam" -ABMatchmakingServerUrl "https://dev.accelbyte.io/matchmaking" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
すべてのサービス URL を上書きする
設定インジェクションは、ベース URL に基づいてすべてのサービス URL を変更する機能に対応しています。この機能は、サービス URL のデフォルト値を使用してすべてのサービス URL を生成します。これを行うには、ベース URL を定義し、OverrideServiceUrl を有効にします。また、すべてのサービス URL を上書きした後に、特定のサービス URL をさらに変更することもできます。これは、上書きコマンドに別のサービス URL を追加することで行えます。
この機能を使用するサンプルシナリオを以下に示します。
- すべてのサービス URL を上書きする
GameExecutable -ABBaseUrl "https://dev.accelbyte.io" -ABOverrideServiceUrl
- すべてのサービス URL を上書きし、別のサービス URL を適用する
GameExecutable -ABBaseUrl "https://dev.accelbyte.io" -ABOverrideServiceUrl -ABMatchmakingServerUrl "https://dev.accelbyte.io/testmatchmaking"
設定一覧
このセクションの一覧は、共通の設定とエンジン固有の設定に分かれています。
すべてのエンジンで利用可能
以下に記載されているゲームクライアントおよびデディケイテッドサーバーは、すべてのエンジンの SDK に存在します。
- ゲームクライアント設定
- デディケイテッドサーバー設定
| No | Name | Type | Usage |
|---|---|---|---|
| 1 | Namespace | string | ゲームのネームスペース |
| 2 | PublisherNamespace | string | スタジオまたはパブリッシャーのネームスペース |
| 3 | ClientId | string | クライアント OAuth 設定用の ID |
| 4 | ClientSecret | string | クライアント OAuth 設定用のシークレット |
| 5 | BaseUrl | string | サービス URL のベース |
| 6 | IamServerUrl | string | |
| 7 | PlatformServerUrl | string | |
| 8 | BasicServerUrl | string | |
| 9 | LobbyServerUrl | string | |
| 10 | CloudStorageServerUrl | string | |
| 11 | GameProfileServerUrl | string | |
| 12 | StatisticServerUrl | string | |
| 13 | QosManagerServerUrl | string | |
| 14 | AgreementServerUrl | string | |
| 15 | LeaderboardServerUrl | string | |
| 16 | CloudSaveServerUrl | string | |
| 17 | GameTelemetryServerUrl | string | |
| 18 | AchievementServerUrl | string | |
| 19 | UGCServerUrl | string | |
| 20 | ReportingServerUrl | string | |
| 21 | SeasonPassServerUrl | string | |
| 22 | SessionBrowserServerUrl | string | |
| 23 | SessionServerUrl | string | |
| 24 | MatchmakingV2ServerUrl | string | |
| 25 | GroupServerUrl | string | |
| 26 | ChatServerWsUrl | string | |
| 27 | ChatServerUrl | string | |
| 28 | GdprServerUrl | string | |
| 29 | AMSServerUrl | string | |
| 30 | RedirectURI | string | |
| 31 | AppId | string | |
| 32 | UseTurnManager | bool | |
| 33 | TurnManagerServerUrl | string | |
| 34 | TurnServerHost | string | |
| 35 | TurnServerPort | int | |
| 36 | TurnServerPassword | string | |
| 37 | TurnServerSecret | string | |
| 38 | TurnServerUsername | string | |
| 39 | PeerMonitorTimeoutMs | int | |
| 40 | PeerMonitorIntervalMs | int | |
| 41 | HostCheckTimeoutMs | int | |
| 42 | EnablePreDefinedEvent | bool | |
| 43 | EnablePresenceBroadcastEvent | bool | |
| 44 | PresenceBroadcastEventInterval | int | |
| 45 | CustomerName | string |
| No | Name | Type | Usage |
|---|---|---|---|
| 1 | Namespace | string | ゲームのネームスペース |
| 2 | PublisherNamespace | string | スタジオまたはパブリッシャーのネームスペース |
| 3 | ClientId | string | サーバー OAuth 設定用の ID |
| 4 | ClientSecret | string | サーバー OAuth 設定用のシークレット |
| 5 | BaseUrl | string | サービス URL のベース |
| 6 | IamServerUrl | string | |
| 7 | PlatformServerUrl | string | |
| 8 | BasicServerUrl | string | |
| 9 | LobbyServerUrl | string | |
| 10 | StatisticServerUrl | string | |
| 11 | QosManagerServerUrl | string | |
| 12 | LeaderboardServerUrl | string | |
| 13 | CloudSaveServerUrl | string | |
| 14 | GameTelemetryServerUrl | string | |
| 15 | AchievementServerUrl | string | |
| 16 | UGCServerUrl | string | |
| 17 | SessionServerUrl | string | |
| 18 | CloudSaveServerUrl | string | |
| 19 | MatchmakingServerUrl | string | |
| 20 | MatchmakingV2ServerUrl | string | |
| 21 | SeasonPassServerUrl | string | |
| 22 | DSHubServerUrl | string | |
| 23 | DSMControllerServerUrl | string | |
| 24 | AMSServerUrl | string | |
| 25 | WatchdogUrl | string | |
| 26 | AMSHeartbeatInterval | int | |
| 27 | RedirectUri | string | |
| 28 | Port | int | |
| 29 | EnablePreDefinedEvent | bool | |
| 30 | StatsDServerUrl | string | |
| 31 | StatsDServerPort | int | |
| 32 | StatsDMetricInterval | int | |
| 33 | DsId | string |
Unreal SDK で利用可能
以下は、Unreal SDK でのみ利用可能なゲームクライアントおよびデディケイテッドサーバーの設定です。
- ゲームクライアント設定
- デディケイテッドサーバー設定
| No | Name | Type |
|---|---|---|
| 1 | GameTelemetryCacheEnabled | bool |
| 2 | EnableAMS | bool |
| 3 | EnableHttpCache | bool |
| 4 | HttpCacheType | string |
| 5 | QosPingTimeout | int |
| 6 | QosLatencyPollIntervalSecs | int |
| 7 | QosServerLatencyPollIntervalSecs | int |
| 8 | NonSeamlessTravelUseNewConnection | bool |
| 9 | RequiresEncryptPackets | bool |
| 10 | ConnectionIdleTimeout | int |
| 11 | RequestConnectTimeout | int |
| 12 | AutoLobbyConnectAfterLoginSuccess | bool |
| 13 | AutoChatConnectAfterLoginSuccess | bool |
| 14 | MultipleLocalUsersEnabled | bool |
| 15 | NativePlatformTokenRefreshManually | bool |
| 16 | SecondaryPlatformName | string |
| 17 | EnableMatchTicketCheck | bool |
| 18 | MatchTicketCheckInitialDelay | int |
| 19 | MatchTicketCheckPollInterval | int |
| 20 | EnableSessionInviteCheckPolling | bool |
| 21 | SessionInviteCheckPollInitialDelay | int |
| 22 | SessionInviteCheckPollInterval | int |
| 23 | EnableSessionServerCheckPolling | bool |
| 24 | SessionServerCheckPollInitialDelay | int |
| 25 | SessionServerCheckPollInterval | int |
| 26 | EnabledEncryption | bool |
| 27 | Components | string |
| No | Name | Type |
|---|---|---|
| 1 | ManualRegisterServer | bool |
Unity SDK で利用可能
以下は、Unity SDK でのみ利用可能なゲームクライアント、デディケイテッドサーバー、および外部の設定です。
- ゲームクライアント設定
- デディケイテッドサーバー設定
- 外部設定
| No | Name | Type |
|---|---|---|
| 1 | UsePlayerPrefs | bool |
| 2 | EnableDebugLog | bool |
| 3 | DebugLogFilter | string |
| 4 | EnableAuthHandshake | bool |
| 5 | MaximumCacheSize | int |
| 6 | MaximumCacheLifeTime | int |
| 7 | PresenceBroadcastEventGameState | int |
| 8 | PresenceBroadcastEventGameStateDescription | string |
| 9 | EnableClientAnalyticsEvent | bool |
| 10 | ClientAnalyticsEventInterval | float |
| 11 | EnableAmsServerQos | bool |
| No | Name | Type |
|---|---|---|
| 1 | EnableDebugLog | bool |
| 2 | DebugLogFilter | string |
| 3 | MaximumCacheSize | int |
| 4 | MaximumCacheLifeTime | int |
| No | Name | Type | Usage |
|---|---|---|---|
| 1 | OverrideServiceUrl | bool | BaseUrl に基づいてすべてのサービス URL を展開する |
使用例
このセクションでは、設定インジェクションを使用できるいくつかのシナリオを紹介します。
別のネームスペースに切り替える
現在ゲームが参照しているネームスペースを切り替えることができます。たとえば、開発ネームスペースでビルドをテストし、ビルドが安定した後にステージネームスペースへ昇格させたい場合、設定インジェクションを使用してこれを実現できます。つまり、ゲームを再ビルドする必要がありません。
- Unreal
- Unity
ご利用の AGS アカウントティアに適したコマンドを使用してください。
- AGS Public Cloud
- AGS Private Cloud
GameExecutable -ABNamespace "studionamespace-targetedgamenamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
AGS 3.78 のリリース以降、等号 (=) も使用できます。
GameExecutable -ABNamespace="studionamespace-targetedgamenamespace" -ABClientId="YourClientId" -ABClientSecret="YourClientSecret"
GameExecutable -ABNamespace "targetedgamenamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
ご利用の AGS アカウントティアに適したコマンドを使用してください。
- AGS Public Cloud
- AGS Private Cloud
GameExecutable -ABNamespace "studionamespace-targetedgamenamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
GameExecutable -ABNamespace "targetedgamenamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
別の環境に切り替える
ゲームが現在参照している環境を変更することもできます。これは、開発環境内のネームスペースから、社内プレイテストイベントやコミュニティプレイテスト向けに指定されている可能性のあるステージ環境のネームスペースへ移行することを意味します。
この方法は、次のようなシナリオで使用できます。
- ある AGS Private Cloud 環境から別の AGS Private Cloud 環境への設定インジェクション。
- AGS Public Cloud 環境から AGS Private Cloud 環境への設定インジェクション、およびその逆。
- Unreal
- Unity
GameExecutable -ABNamespace "targetedgamenamespace" -ABPublisherNamespace "targetedpublishernamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret" -ABBaseUrl "https://cert.accelbyte.io"
AGS 3.78 のリリース以降、等号 (=) も使用できます。
GameExecutable -ABNamespace="targetedgamenamespace" -ABPublisherNamespace="targetedpublishernamespace" -ABClientId="YourClientId" -ABClientSecret="YourClientSecret" -ABBaseUrl="https://cert.accelbyte.io"
GameExecutable -ABNamespace "targetedgamenamespace" -ABPublisherNamespace "targetedpublishernamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret" -ABBaseUrl "https://cert.accelbyte.io" -ABOverrideServiceUrl