-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathGameLiftClientSettings.cs
52 lines (46 loc) · 1.66 KB
/
GameLiftClientSettings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
using AmazonGameLiftPlugin.Core;
using UnityEngine;
namespace AmazonGameLift.Runtime
{
[CreateAssetMenu(fileName = "GameLiftClientSettings", menuName = "GameLift/Client Settings")]
public sealed class GameLiftClientSettings : ScriptableObject
{
public string AwsRegion;
public string UserPoolClientId;
public string ApiGatewayUrl;
public bool IsGameLiftAnywhere;
public GameLiftConfiguration GetConfiguration()
{
return new GameLiftConfiguration
{
ApiGatewayEndpoint = ApiGatewayUrl,
AwsRegion = AwsRegion,
UserPoolClientId = UserPoolClientId,
IsGameLiftAnywhere = IsGameLiftAnywhere
};
}
public void ConfigureAnywhereClientSettings()
{
IsGameLiftAnywhere = true;
AwsRegion = "";
ApiGatewayUrl = "";
UserPoolClientId = "";
}
public void ConfigureManagedEC2ClientSettings(string awsRegion, string apiGatewayUrl, string userPoolClientId)
{
IsGameLiftAnywhere = false;
AwsRegion = awsRegion;
ApiGatewayUrl = apiGatewayUrl;
UserPoolClientId = userPoolClientId;
}
public void ConfigureContainersClientSettings(string awsRegion, string apiGatewayUrl, string userPoolClientId)
{
IsGameLiftAnywhere = false;
AwsRegion = awsRegion;
ApiGatewayUrl = apiGatewayUrl;
UserPoolClientId = userPoolClientId;
}
}
}