Interface IProjectConfiguration
Component for project configuration.
Namespace: Unity.Services.Core.Configuration.Internal
Assembly: Unity.Services.Core.Internal.dll
Syntax
public interface IProjectConfiguration : IServiceComponent
Remarks
For WebGL platform, the configuration is only accessable if the application is hosted behind https. Behind http you will get an error: Insecure connection not allowed.
Methods
GetBool(string, bool)
Get the boolean value for the project config key.
Declaration
bool GetBool(string key, bool defaultValue = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The identifier of the project config to find. |
| bool | defaultValue | The value returned if there is no match for the given |
Returns
| Type | Description |
|---|---|
| bool | Return the boolean value for the project config for the given |
GetFloat(string, float)
Get the float value for the project config with the given key.
Declaration
float GetFloat(string key, float defaultValue = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The identifier of the project config to find. |
| float | defaultValue | The value returned if there is no match for the given |
Returns
| Type | Description |
|---|---|
| float | Return the float value for the project config for the given |
GetInt(string, int)
Get the integer value for the project config with the given key.
Declaration
int GetInt(string key, int defaultValue = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The identifier of the project config to find. |
| int | defaultValue | The value returned if there is no match for the given |
Returns
| Type | Description |
|---|---|
| int | Return the integer value for the project config for the given |
GetString(string, string)
Get the string value for the project config with the given key.
Declaration
string GetString(string key, string defaultValue = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The identifier of the project config to find. |
| string | defaultValue | The value returned if there is no match for the given |
Returns
| Type | Description |
|---|---|
| string | Return the string value for the project config for the given |