assets | The asset list to test. |
asset | The asset to test. |
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)); } }