# SetVersionControl(string)

> Sets the active version control system.

## Definition

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

```csharp
public static bool SetVersionControl(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Unique version control system name.

### Returns

| Type                                                          | Description                                                      |
| ------------------------------------------------------------- | ---------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns **true** if VCS has been activated. **false** otherwise. |

### Remarks

If a different VCS was previously active, it will be deactivated. You can use the [VersionControlManager.versionControlDescriptors](/engine/6000.5/script-reference/unityeditor/versioncontrol/versioncontrolmanager/versioncontroldescriptors.md) property to retrieve all the available version control systems. You can check the newly activated [VersionControlObject](/engine/6000.5/script-reference/unityeditor/versioncontrol/versioncontrolobject.md) by using the [VersionControlManager.activeVersionControlObject](/engine/6000.5/script-reference/unityeditor/versioncontrol/versioncontrolmanager/activeversioncontrolobject.md) property.

```csharp
using UnityEditor;
using UnityEditor.VersionControl;
using UnityEngine;

static class Example
{
    [MenuItem("Example/Set Custom VCS")]
    static void SetCustomVCS()
    {
        if (!VersionControlManager.SetVersionControl("Custom"))
            Debug.LogWarning("Failed to set custom VCS.");
    }
}
```

Additional Resources: [VersionControlManager](/engine/6000.5/script-reference/unityeditor/versioncontrol/versioncontrolmanager.md), [VersionControlObject](/engine/6000.5/script-reference/unityeditor/versioncontrol/versioncontrolobject.md), [VersionControlDescriptor](/engine/6000.5/script-reference/unityeditor/versioncontrol/versioncontroldescriptor.md), [Provider](/engine/6000.5/script-reference/unityeditor/versioncontrol/provider.md).
