AssetDatabase.IsOpenForEdit
static function IsOpenForEdit(assetObject: Object): bool;
static function IsOpenForEdit(assetPath: string): bool;
static function IsOpenForEdit(assetObject: Object, message: string): bool;
static function IsOpenForEdit(assetPath: string, message: string): bool;
Parameters

assetPath Is the path to the asset on disk relative to project folder.
message Used to give reason for not open.
Returns
bool True is the asset can be edited.
Description

Use IsOpenForEdit to determine if the asset is open for edit by the version control.

Used to disable editor controls.