# GetActiveConfigFields()

> Returns the configuration fields for the currently active version control plugin.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.VersionControl](/engine/6000.6/script-reference/unityeditor/versioncontrol.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static ConfigField[] GetActiveConfigFields()
```

### Returns

| Type                                                                                         | Description |
| -------------------------------------------------------------------------------------------- | ----------- |
| [ConfigField\[\]](/engine/6000.6/script-reference/unityeditor/versioncontrol/configfield.md) |             |

### Remarks

The task can be useful if, for example, you need to change the version control plugin's credentials.

```csharp
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.VersionControl;
using UnityEngine;

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/ConfigField")]
    public static void ExampleConfigField()
    {
        ConfigField[] exampleConfigField;
        exampleConfigField = Provider.GetActiveConfigFields();
        EditorUserSettings.SetConfigValue(exampleConfigField[0].name, "username2");
        Provider.UpdateSettings().Wait();
    }
}
```

The code above will fetch the currectly selected version control's config field names, change the first field to "username2" and update the version control settings.
