# Status

> Starts a task that will fetch the most recent status about the asset or assets from the revision control system.

## Definition

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

## Status(AssetList)

Starts a task that will fetch the most recent status about the asset or assets from the revision control system.

```csharp
public static Task Status(AssetList assets)
```

### Parameters

**** (\[AssetList]\(/engine/6000.6/script-reference/unityeditor/versioncontrol/assetlist)): The asset list to fetch state information for.

### Returns

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

### Remarks

The updated assets can be access through the task's assetList property once it has completed.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Status")]
    public static void ExampleStatus()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t = Provider.Status(assets);
        t.Wait();
        t.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString()));
    }
}
```

The example code above will check the status of the given example asset and its .meta file and output that information into the console.

## Status(Asset)

Starts a task that will fetch the most recent status about the asset or assets from the revision control system.

```csharp
public static Task Status(Asset asset)
```

### Parameters

**** (\[Asset]\(/engine/6000.6/script-reference/unityeditor/versioncontrol/asset)): The asset to fetch state information for.

### Returns

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

### Remarks

The updated assets can be access through the task's assetList property once it has completed.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Status")]
    public static void ExampleStatus()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t = Provider.Status(assets);
        t.Wait();
        t.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString()));
    }
}
```

The example code above will check the status of the given example asset and its .meta file and output that information into the console.

## Status(AssetList, bool)

Starts a task that will fetch the most recent status about the asset or assets from the revision control system.

```csharp
public static Task Status(AssetList assets, bool recursively)
```

### Parameters

**** (\[AssetList]\(/engine/6000.6/script-reference/unityeditor/versioncontrol/assetlist)): The asset list to fetch state information for.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If any assets specified are folders this flag will get status for all descendants of the folder as well.

### Returns

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

### Remarks

The updated assets can be access through the task's assetList property once it has completed.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Status")]
    public static void ExampleStatus()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t = Provider.Status(assets);
        t.Wait();
        t.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString()));
    }
}
```

The example code above will check the status of the given example asset and its .meta file and output that information into the console.

## Status(Asset, bool)

Starts a task that will fetch the most recent status about the asset or assets from the revision control system.

```csharp
public static Task Status(Asset asset, bool recursively)
```

### Parameters

**** (\[Asset]\(/engine/6000.6/script-reference/unityeditor/versioncontrol/asset)): The asset to fetch state information for.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If any assets specified are folders this flag will get status for all descendants of the folder as well.

### Returns

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

### Remarks

The updated assets can be access through the task's assetList property once it has completed.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Status")]
    public static void ExampleStatus()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t = Provider.Status(assets);
        t.Wait();
        t.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString()));
    }
}
```

The example code above will check the status of the given example asset and its .meta file and output that information into the console.

## Status(string\[])

Starts a task that will fetch the most recent status about the asset or assets from the revision control system.

```csharp
public static Task Status(string[] assets)
```

### Parameters

**** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)): The asset list to fetch state information for.

### Returns

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

### Remarks

The updated assets can be access through the task's assetList property once it has completed.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Status")]
    public static void ExampleStatus()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t = Provider.Status(assets);
        t.Wait();
        t.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString()));
    }
}
```

The example code above will check the status of the given example asset and its .meta file and output that information into the console.

## Status(string\[], bool)

Starts a task that will fetch the most recent status about the asset or assets from the revision control system.

```csharp
public static Task Status(string[] assets, bool recursively)
```

### Parameters

**** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)): The asset list to fetch state information for.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If any assets specified are folders this flag will get status for all descendants of the folder as well.

### Returns

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

### Remarks

The updated assets can be access through the task's assetList property once it has completed.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Status")]
    public static void ExampleStatus()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t = Provider.Status(assets);
        t.Wait();
        t.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString()));
    }
}
```

The example code above will check the status of the given example asset and its .meta file and output that information into the console.

## Status(string)

Starts a task that will fetch the most recent status about the asset or assets from the revision control system.

```csharp
public static Task Status(string asset)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The asset to fetch state information for.

### Returns

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

### Remarks

The updated assets can be access through the task's assetList property once it has completed.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Status")]
    public static void ExampleStatus()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t = Provider.Status(assets);
        t.Wait();
        t.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString()));
    }
}
```

The example code above will check the status of the given example asset and its .meta file and output that information into the console.

## Status(string, bool)

Starts a task that will fetch the most recent status about the asset or assets from the revision control system.

```csharp
public static Task Status(string asset, bool recursively)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The asset to fetch state information for.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If any assets specified are folders this flag will get status for all descendants of the folder as well.

### Returns

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

### Remarks

The updated assets can be access through the task's assetList property once it has completed.

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

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Status")]
    public static void ExampleStatus()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t = Provider.Status(assets);
        t.Wait();
        t.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString()));
    }
}
```

The example code above will check the status of the given example asset and its .meta file and output that information into the console.
