Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

VersionControl.Provider.Lock

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

Sumbission failed

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

Close

Cancel

public static function Lock(assets: AssetList, locked: bool): Task;
public static Task Lock(AssetList assets, bool locked);
public static def Lock(assets as AssetList, locked as bool) as Task
public static function Lock(asset: Asset, locked: bool): Task;
public static Task Lock(Asset asset, bool locked);
public static def Lock(asset as Asset, locked as bool) as Task

Parameters

assets List of assets to lock/unlock.
locked True to lock assets, false to unlock assets.
asset Asset to lock/unlock.

Description

Attempt to lock an asset for exclusive editing.

Depening on version control system and server setup this might be an exclusive lock preventing other people from even modifing the asset or or it might simple prevent other people from submitting the asset to the version control server.