UnlockIsValid
Returns true if unlocking the assets is a valid operation.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEditor.VersionControl
- Assembly: UnityEditor.CoreModule
UnlockIsValid(AssetList)
Returns true if unlocking the assets is a valid operation.
public static bool UnlockIsValid(AssetList assets)
Parameters
The asset list to test.
Returns
Type | Description |
|---|---|
| bool |
Examples
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)); }}
UnlockIsValid(Asset)
Returns true if unlocking the assets is a valid operation.
public static bool UnlockIsValid(Asset asset)
Parameters
The asset to test.
Returns
Type | Description |
|---|---|
| bool |
Examples
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)); }}