# Resolve(AssetList, ResolveMethod)

> Starts a task that will resolve the conflicting assets in version control.

## Definition

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

```csharp
public static Task Resolve(AssetList assets, ResolveMethod resolveMethod)
```

### Parameters

**** (\[AssetList]\(/engine/6000.7/script-reference/unityeditor/versioncontrol/assetlist)): List of assets to resolve.**** (\[ResolveMethod]\(/engine/6000.7/script-reference/unityeditor/versioncontrol/resolvemethod)): How the assets should be resolved.

### Returns

| Type                                                                       | Description |
| -------------------------------------------------------------------------- | ----------- |
| [Task](/engine/6000.7/script-reference/unityeditor/versioncontrol/task.md) |             |

### Remarks

When conflicts between the depot and the local version of the asset appear you can resolve them by keeping either your own copy or the incoming copy.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/ResolveUseTheirs")]
    public static void ExampleResolve()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t = Provider.Resolve(assets, ResolveMethod.UseTheirs);
        t.Wait();
    }
}
```

The code above will resolve the "ExampleAsset.cs" file's conflict by discarding local changes and only keeping the incoming ones.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/ResolveUseMerged")]
    public static void ExampleResolve()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t1 = Provider.Merge(assets);
        t1.Wait();
        Task t2 = Provider.Resolve(assets, ResolveMethod.UseMerged);
        t2.Wait();
    }
}
```

The code above shows a third way of resolving the conflict - merging the two versions together. The correct way to do this is to first, call the [Provider.Merge](/engine/6000.7/script-reference/unityeditor/versioncontrol/provider/merge.md) task on the conflicting assets and then resolve them using the [Provider.Resolve](/engine/6000.7/script-reference/unityeditor/versioncontrol/provider/resolve.md) task with the [ResolveMethod.UseMerged](/engine/6000.7/script-reference/unityeditor/versioncontrol/resolvemethod/usemerged.md) method.
