LockIsValid(AssetList)
Returns true if the Provider.Lock task can be executed on one or more assets from the given asset list.
阅读时间1 分钟最后更新于 11 天前
Definition
- Type: Method
- Namespace: UnityEditor.VersionControl
- Assembly: UnityEditor.CoreModule
public static bool LockIsValid(AssetList assets)
Parameters
List of assets to test.
Returns
Type | Description |
|---|---|
| bool | True if Provider.Lock can be executed on one or more assets in the given list. Otherwise, false. |
Examples
using System.Collections.Generic;using UnityEditor;using UnityEditor.VersionControl;using UnityEngine;public class EditorScript : MonoBehaviour{ [MenuItem("Version Control/LockIsValid")] public static void ExampleLockIsValid() { AssetList assets = new AssetList(); assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs")); Debug.Log("LockIsvalid? " + Provider.LockIsValid(assets)); }}