# Incoming()

> Starts a task that queries the version control server for incoming changes.

## Definition

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

```csharp
public static Task Incoming()
```

### Returns

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

### Remarks

The task returns the incoming changesets which then can be accessed through the task's [Task.changeSets](/engine/6000.3/script-reference/unityeditor/versioncontrol/task/changesets.md) property once it has been completed.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Incoming")]
    public static void ExampleIncoming()
    {
        ChangeSets exampleChangesets = new ChangeSets();
        ChangeSet exampleChangeset = new ChangeSet();
        Task t1 = Provider.Incoming();
        t1.Wait();
        exampleChangesets = t1.changeSets;
        exampleChangeset = exampleChangesets[0];
        Task t2 = Provider.IncomingChangeSetAssets(exampleChangeset);
        t2.Wait();
        t2.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString()));
    }
}
```

The code above fetches the incoming changesets using [Provider.Incoming](/engine/6000.3/script-reference/unityeditor/versioncontrol/provider/incoming.md) and parses it to [Provider.IncomingChangeSetAssets](/engine/6000.3/script-reference/unityeditor/versioncontrol/provider/incomingchangesetassets.md) in order to output the incoming asset file names and their status.
