設定インジェクション
Introduction
You can use config injection in AccelByte Gaming Services (AGS) to override the SDK and OAuth Config at the game execution call. It supports multiple override commands.
When overriding the config, it will not modify the SDK config file value. It only overrides the value that is declared in the override commands and preserves the other config value.
Override commands
To inject the SDK and OAuth config, use the -AB<Config_Name> <Config_Value>
command, as in the following example:
- Unreal
- Unity
Set the commands as a command-line argument before executing the binary.
GameExecutable -ABIamServerUrl "https://dev.accelbyte.io/iam" -ABMatchmakingServerUrl "https://dev.accelbyte.io/matchmaking" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
As of the release of AGS 3.78, you can also use an equals sign:
GameExecutable -ABIamServerUrl="https://dev.accelbyte.io/iam" -ABMatchmakingServerUrl="https://dev.accelbyte.io/matchmaking" -ABClientId="YourClientId" -ABClientSecret="YourClientSecret"
When applying config injection, note the following:
- This injection will affect the client and server configs.
- The
Config_Name
is not case sensitive. - If you leave the
Config_Value
boolean empty, it will automatically be set totrue
.
- Editor
- Executable
Set the arguments of your project from Unity Hub before starting the project.
-ABIamServerUrl "https://dev.accelbyte.io/iam" -ABMatchmakingServerUrl "https://dev.accelbyte.io/matchmaking" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
Set the commands as a command-line argument before executing the binary.
GameExecutable -ABIamServerUrl "https://dev.accelbyte.io/iam" -ABMatchmakingServerUrl "https://dev.accelbyte.io/matchmaking" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
Override all service URLs
The config injection supports changing all service URLs based on the Base URL. This feature will generate all service URLs using the default of the service URL. To do that, define the Base URL and enable the Override Service URL. This feature also allows you to change another specific service URL after overriding all the service URLs. You can do that by adding another service URL in the override command.
The following are sample scenarios for using this feature:
- Override all service URLs
GameExecutable -ABBaseUrl "https://dev.accelbyte.io" -ABOverrideServiceUrl
- Override all service URLs and apply another service URL
GameExecutable -ABBaseUrl "https://dev.accelbyte.io" -ABOverrideServiceUrl -ABMatchmakingServerUrl "https://dev.accelbyte.io/testmatchmaking"
Config list
The list in this section is separated into common and engine-specific configs.
Available in all engines
All of these listed game clients and dedicated servers exist in the SDK for all engines.
- Game client configs
- Dedicated server configs
No | Name | Type | Usage |
---|---|---|---|
1 | Namespace | string | The game namespace |
2 | PublisherNamespace | string | The studio or publisher namespace |
3 | ClientId | string | The ID for client OAuth config |
4 | ClientSecret | string | The secret for client OAuth config |
5 | BaseUrl | string | The base of service 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 | The game namespace |
2 | PublisherNamespace | string | The studio or publisher namespace |
3 | ClientId | string | The ID for server OAuth config |
4 | ClientSecret | string | The secret for server OAuth config |
5 | BaseUrl | string | The base of service 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 |
Available in the Unreal SDK
The following are game client and dedicated server configs that are only available in the Unreal SDK.
- Game client configs
- Dedicated server configs
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 |
Available in the Unity SDK
The following are game client, dedicated server, and external configs that are only available in the Unity SDK.
- Game client configs
- Dedicated server configs
- External configs
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 | Expand all service URLs based on BaseUrl |
Sample usage
This section lists a few scenarios in which you can use config injection.
Jump into another namespace
You can switch the namespace that your game currently points to. For instance, when you wish to test the build within the development namespace and later promote it to the stage namespace once the build is stable, you can accomplish this using config injection. This means you won't need to rebuild the game again.
- Unreal
- Unity
Use the command applicable to your AGS account tier.
- AGS Shared Cloud
- AGS Private Cloud
GameExecutable -ABNamespace "studionamespace-targetedgamenamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
As of the release of AGS 3.78, you can also use an equals sign:
GameExecutable -ABNamespace="studionamespace-targetedgamenamespace" -ABClientId="YourClientId" -ABClientSecret="YourClientSecret"
GameExecutable -ABNamespace "targetedgamenamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
Use the command applicable to your AGS account tier.
- AGS Shared Cloud
- AGS Private Cloud
GameExecutable -ABNamespace "studionamespace-targetedgamenamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
GameExecutable -ABNamespace "targetedgamenamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret"
Jump into another environment
You also have the option to change the environment that your game currently references. This means transitioning from a namespace within the development environment to one in the stage environment, which might be designated for internal play test events or community play tests.
You can use this option in the following scenarios:
- A config inject from an AGS Private Cloud environment to another AGS Private Cloud environment.
- A config inject from an AGS Shared Cloud environment to an AGS Private Cloud environment and vice versa.
- Unreal
- Unity
GameExecutable -ABNamespace "targetedgamenamespace" -ABPublisherNamespace "targetedpublishernamespace" -ABClientId "YourClientId" -ABClientSecret "YourClientSecret" -ABBaseUrl "https://cert.accelbyte.io"
As of the release of AGS 3.78, you can also use an equals sign:
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