Version: 2022.3
언어: 한국어

Provider.GetLatestIsValid

매뉴얼로 전환
public static bool GetLatestIsValid (VersionControl.AssetList assets);

파라미터

assets List of assets to test.

설명

The task tests the given asset list and returns true if Provider.GetLatest is valid operation for one or more assets.

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

public class EditorScript : MonoBehaviour { [MenuItem("Version Control/GetLatestIsValid")] public static void ExampleGetLatestIsValid() { AssetList assets = new AssetList(); assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs")); assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs.meta")); Task t = Provider.GetLatest(assets); t.Wait(); } }