# Remote Config

Remote Config is a feature that allows you to replace values or properties managed within your application with parameter values defined in the Hackle Dashboard, enabling you to control your application's behavior and settings in real time.

Navigate to the Remote Config screen in the Hackle Dashboard to configure parameters and set values based on user identification rules.

## remoteConfig

Calling the `RemoteConfig()` method returns a `HackleRemoteConfig` instance that contains the Remote Config information for the user (configured parameters and rule information).\
`RemoteConfig()` accepts user identifier information to match user properties against the Remote Config rule information.\
You can access the desired parameters and receive their values through the methods provided by `HackleRemoteConfig`.

## Query Remote Config Parameters

* The `HackleRemoteConfig` instance returned by `remoteConfig()` contains all parameter configuration information set in Remote Config.
* Since parameter values configured in the Hackle Remote Config screen are stored as key-value pairs, use the methods below according to the parameter type to retrieve the configured values.
* You can dynamically update rules and values in the Remote Config parameter settings screen.

{% hint style="warning" %}
Remove Remote Config-related code after archiving.

Once a Remote Config parameter is archived, you can no longer access its parameter information. Therefore, be sure to clean up the related code after archiving a Remote Config parameter.
{% endhint %}

### GetString

* Returns parameter values configured as STRING or JSON type.
* Returns the default value or the value configured in a rule based on the state decision.

```csharp
HackleRemoteConfig remoteConfig = hackle.RemoteConfig();

string strValue = remoteConfig.GetString("parameter_key_string_type", "defaultValue");
string jsonValue = remoteConfig.GetString("parameter_key_json_type", "{}");
```

### GetInt

* Returns parameter values configured as Number type as an Int.
* Returns the default value or the value configured in a rule based on the state decision.

```csharp
HackleRemoteConfig remoteConfig = hackle.RemoteConfig();

int intValue = remoteConfig.GetInt("parameter_key_number_type", 0);
```

### GetDouble

* Returns parameter values configured as Number type as a Double.
* Returns the default value or the value configured in a rule based on the state decision.

```csharp
HackleRemoteConfig remoteConfig = hackle.RemoteConfig();

double doubleValue = remoteConfig.GetDouble("parameter_key_number_type", 0.0);
```

### GetLong

* Returns parameter values configured as Number type as a Long.
* Returns the default value or the value configured in a rule based on the state decision.

```csharp
HackleRemoteConfig remoteConfig = hackle.RemoteConfig();

long longValue = remoteConfig.GetLong("parameter_key_number_type", 0);
```

### GetBoolean

* Returns parameter values configured as Boolean type.
* Returns the default value or the value configured in a rule based on the state decision.

```csharp
HackleRemoteConfig remoteConfig = hackle.RemoteConfig();

bool boolValue = remoteConfig.GetBoolean("parameter_key_boolean_type", false);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hackle.io/en/development-guide/unity/unity-remote-config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
