# Task

> A Task describes an instance of a version control operation.

## Definition

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

```csharp
public class Task
```

## Remarks

An object of this type allows you to process operations such as [Provider.Checkout](/engine/6000.6/script-reference/unityeditor/versioncontrol/provider/checkout.md), [Provider.GetLatest](/engine/6000.6/script-reference/unityeditor/versioncontrol/provider/getlatest.md), and [Provider.Submit](/engine/6000.6/script-reference/unityeditor/versioncontrol/provider/submit.md). Unity creates this item almost every time you ask [Provider](/engine/6000.6/script-reference/unityeditor/versioncontrol/provider.md) to perform an action. Task objects, that version control operations return, execute in the background and don't always finish immediately, use [Task.Wait](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/wait.md) if you need to wait for them to finish.

## Properties

| Property                                                                                        | Description                                                        |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [assetList](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/assetlist.md)       | The result of some types of tasks.                                 |
| [changeSets](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/changesets.md)     | List of changesets returned by some tasks.                         |
| [description](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/description.md)   | A short description of the current task.                           |
| [messages](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/messages.md)         | May contain messages from the version control plugins.             |
| [progressPct](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/progresspct.md)   | A progress percentage for the current task.                        |
| [resultCode](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/resultcode.md)     | Some task return result codes, these are stored here.              |
| [secondsSpent](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/secondsspent.md) | Total time spent in task since the task was started.               |
| [success](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/success.md)           | Get whether or not the task was completed succesfully.             |
| [text](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/text.md)                 | Will contain the result of the Provider.ChangeSetDescription task. |

## Methods

| Method                                                                                                        | Description                                                                 |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [SetCompletionAction](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/setcompletionaction.md) | Upon completion of a task a completion task will be performed if it is set. |
| [Wait](/engine/6000.6/script-reference/unityeditor/versioncontrol/task/wait.md)                               | A blocking wait for the task to complete.                                   |
