public static bool UnlockIsValid (VersionControl.AssetList assets);
public static bool UnlockIsValid (VersionControl.Asset asset);

Parameters

assetsThe asset list to test.
assetThe asset to test.

Description

Returns true if unlocking the assets is a valid operation.

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

public class EditorScript : MonoBehaviour { [MenuItem("Version Control/UnlockIsValid")] public static void ExampleUnlockIsValid() { AssetList assets = new AssetList(); assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs")); Debug.Log(Provider.UnlockIsValid(assets)); } }