# IsMetaFileOpenForEdit

> Checks whether the.meta file of an asset object is open for editing in version control.

## Definition

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

## IsMetaFileOpenForEdit(Object, StatusQueryOptions)

Checks whether the .meta file of an asset object is open for editing in version control.

```csharp
public static bool IsMetaFileOpenForEdit(Object assetObject, StatusQueryOptions statusOptions)
```

### Parameters

**** (\[Object]\(/engine/7000.0/script-reference/unityengine/object)): The asset object to check.**** (\[StatusQueryOptions]\(/engine/7000.0/script-reference/unityeditor/statusqueryoptions)): How to query the version control system. These options affect the speed and accuracy of the query. The default value is [StatusQueryOptions.UseCachedIfPossible](/engine/7000.0/script-reference/unityeditor/statusqueryoptions/usecachedifpossible.md).

### Returns

| Type                                                          | Description                                                                                     |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the version control system considers the .meta file open for editing. Otherwise, false. |

### Remarks

Some version control systems only let one user at a time edit certain types of file, to avoid conflicts. In that case, you must open the file for editing, also known as checking it out, before you can edit it. Use this method to check whether the .meta file of an asset is open for editing. To check the asset file, use [AssetDatabase.IsOpenForEdit](/engine/7000.0/script-reference/unityeditor/assetdatabase/isopenforedit.md).

## IsMetaFileOpenForEdit(Object, string, StatusQueryOptions)

Checks whether the .meta file of an asset object is open for editing in version control and gets the reason if it isn't.

```csharp
public static bool IsMetaFileOpenForEdit(Object assetObject, out string message, StatusQueryOptions statusOptions)
```

### Parameters

**** (\[Object]\(/engine/7000.0/script-reference/unityengine/object)): The asset object to check.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): When the method returns, contains the reason why the asset isn't available for editing, if there is one.**** (\[StatusQueryOptions]\(/engine/7000.0/script-reference/unityeditor/statusqueryoptions)): How to query the version control system. These options affect the speed and accuracy of the query. The default value is [StatusQueryOptions.UseCachedIfPossible](/engine/7000.0/script-reference/unityeditor/statusqueryoptions/usecachedifpossible.md).

### Returns

| Type                                                          | Description                                                                                     |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the version control system considers the .meta file open for editing. Otherwise, false. |

### Remarks

Some version control systems only let one user at a time edit certain types of file, to avoid conflicts. In that case, you must open the file for editing, also known as checking it out, before you can edit it. Use this method to check whether the .meta file of an asset is open for editing. To check the asset file, use [AssetDatabase.IsOpenForEdit](/engine/7000.0/script-reference/unityeditor/assetdatabase/isopenforedit.md).
