Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

AssetDatabase.IsMetaFileOpenForEdit

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static bool IsMetaFileOpenForEdit(Object assetObject, StatusQueryOptions statusOptions = StatusQueryOptions.UseCachedIfPossible);

Parameters

Parameter Description
assetObject The asset object to check.
statusOptions How to query the version control system. These options affect the speed and accuracy of the query. The default value is StatusQueryOptions.UseCachedIfPossible.

Returns

bool True if the version control system considers the .meta file open for editing. Otherwise, false.

Description

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

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.


Declaration

public static bool IsMetaFileOpenForEdit(Object assetObject, out string message, StatusQueryOptions statusOptions = StatusQueryOptions.UseCachedIfPossible);

Parameters

Parameter Description
assetObject The asset object to check.
message When the method returns, contains the reason why the asset isn't available for editing, if there is one.
statusOptions How to query the version control system. These options affect the speed and accuracy of the query. The default value is StatusQueryOptions.UseCachedIfPossible.

Returns

void True if the version control system considers the .meta file open for editing. Otherwise, false.

Description

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

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.