Interface IProjectConfiguration
Component for project configuration.
Namespace: Unity.Services.Core.Configuration.Internal
Syntax
public interface IProjectConfiguration : IServiceComponentRemarks
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, Boolean)
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. | 
| Boolean | defaultValue | The value returned if there is no match for the given  | 
Returns
| Type | Description | 
|---|---|
| Boolean | Return the boolean value for the project config for the given  | 
GetFloat(String, Single)
Get the float value for the project config with the given key.
Declaration
float GetFloat(string key, float defaultValue = 0F)Parameters
| Type | Name | Description | 
|---|---|---|
| String | key | The identifier of the project config to find. | 
| Single | defaultValue | The value returned if there is no match for the given  | 
Returns
| Type | Description | 
|---|---|
| Single | Return the float value for the project config for the given  | 
GetInt(String, Int32)
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. | 
| Int32 | defaultValue | The value returned if there is no match for the given  | 
Returns
| Type | Description | 
|---|---|
| Int32 | 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  |