private static bool MakeAssetEditable(Asset asset) { #if UNITY_2019_4_OR_NEWER if (!AssetDatabase.IsOpenForEdit(asset.path)) { return(AssetDatabase.MakeEditable(asset.path)); } #else if (!Provider.IsOpenForEdit(asset)) { CheckoutMode mode = asset.isMeta ? CheckoutMode.Meta : CheckoutMode.Asset; Task task = Provider.Checkout(asset, mode); task.Wait(); return(task.success); } #endif return(false); }
static string GetCheckoutModeDescription(CheckoutMode checkoutMode) { switch (checkoutMode) { case CheckoutMode.NeedsPull: return("update branch"); case CheckoutMode.Switch: return("switch branches"); case CheckoutMode.Fetch: case CheckoutMode.InvalidState: return("checkout pull request"); default: Debug.Fail("Invalid CheckoutMode in GetCheckoutModeDescription"); return(null); } }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(string asset, CheckoutMode mode) { return(Provider.Internal_CheckoutStrings(new string[1] { asset }, mode)); }
public static bool CheckoutIsValid(Asset asset, CheckoutMode mode) { return(Provider.Internal_CheckoutIsValid(new Asset[1] { asset }, mode)); }
public static Task Checkout(UnityEngine.Object asset, CheckoutMode mode) { string assetPath = AssetDatabase.GetAssetPath(asset); Asset assetByPath = Provider.GetAssetByPath(assetPath); return Provider.Internal_Checkout(new Asset[] { assetByPath }, mode); }
private static extern bool Internal_CheckoutIsValid(Asset[] assets, CheckoutMode mode);
static public Task Checkout(string asset, CheckoutMode mode) { return(Checkout(asset, mode, null)); }
static public Task Checkout(AssetList assets, CheckoutMode mode) { return(Checkout(assets, mode, null)); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(Object asset, CheckoutMode mode) { return Provider.Internal_Checkout(new Asset[1]{ Provider.GetAssetByPath(AssetDatabase.GetAssetPath(asset)) }, mode); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(string asset, CheckoutMode mode) { return Provider.Internal_CheckoutStrings(new string[1]{ asset }, mode); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(Asset asset, CheckoutMode mode) { return Provider.Internal_Checkout(new Asset[1]{ asset }, mode); }
public static bool CheckoutIsValid(Asset asset, CheckoutMode mode) { return Provider.Internal_CheckoutIsValid(new Asset[1]{ asset }, mode); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(Object[] assets, CheckoutMode mode) { AssetList assetList = new AssetList(); foreach (Object asset in assets) { Asset assetByPath = Provider.GetAssetByPath(AssetDatabase.GetAssetPath(asset)); assetList.Add(assetByPath); } return Provider.Internal_Checkout(assetList.ToArray(), mode); }
static public Task Checkout(Asset asset, CheckoutMode mode) { return(Internal_Checkout(new Asset[] { asset }, mode)); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(string asset, CheckoutMode mode) { string[] assets = new string[] { asset }; return Internal_CheckoutStrings(assets, mode); }
static public Task Checkout(AssetList assets, CheckoutMode mode) { return(Internal_Checkout(assets.ToArray(), mode)); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(Asset asset, CheckoutMode mode) { Asset[] assets = new Asset[] { asset }; return Internal_Checkout(assets, mode); }
static public Task Checkout(Object[] assets, CheckoutMode mode) { return(Checkout(assets, mode, null)); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(AssetList assets, CheckoutMode mode) { return Internal_Checkout(assets.ToArray(), mode); }
static public Task Checkout(UnityEngine.Object asset, CheckoutMode mode) { return(Checkout(asset, mode, null)); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(string[] assets, CheckoutMode mode) { return Internal_CheckoutStrings(assets, mode); }
private static extern Task Internal_CheckoutStrings(string[] assets, CheckoutMode mode);
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(Object[] assets, CheckoutMode mode) { AssetList list = new AssetList(); foreach (Object obj2 in assets) { Asset assetByPath = GetAssetByPath(AssetDatabase.GetAssetPath(obj2)); list.Add(assetByPath); } return Internal_Checkout(list.ToArray(), mode); }
public static Task Checkout(Asset asset, CheckoutMode mode) { Asset[] assets = new Asset[] { asset }; return(Internal_Checkout(assets, mode)); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(Object asset, CheckoutMode mode) { Asset assetByPath = GetAssetByPath(AssetDatabase.GetAssetPath(asset)); Asset[] assets = new Asset[] { assetByPath }; return Internal_Checkout(assets, mode); }
private static extern Task Internal_Checkout(Asset[] assets, CheckoutMode mode);
public static bool CheckoutIsValid(Asset asset, CheckoutMode mode) { Asset[] assets = new Asset[] { asset }; return Internal_CheckoutIsValid(assets, mode); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(Asset asset, CheckoutMode mode) { return(Provider.Internal_Checkout(new Asset[1] { asset }, mode)); }
public static bool CheckoutIsValid(AssetList assets, CheckoutMode mode) { return Internal_CheckoutIsValid(assets.ToArray(), mode); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(Object asset, CheckoutMode mode) { return(Provider.Internal_Checkout(new Asset[1] { Provider.GetAssetByPath(AssetDatabase.GetAssetPath(asset)) }, mode)); }
static public Task Checkout(string asset, CheckoutMode mode) { return(Internal_CheckoutStrings(new string[] { asset }, mode)); }
static public Task Checkout(string[] assets, CheckoutMode mode) { return(Internal_CheckoutStrings(assets, mode)); }
static public Task Checkout(AssetList assets, CheckoutMode mode, ChangeSet changeset) { return(CheckCallbackAndCheckout(assets, mode, changeset)); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(AssetList assets, CheckoutMode mode) => Internal_Checkout(assets.ToArray(), mode);
static public bool CheckoutIsValid(Asset asset, CheckoutMode mode) { return(Internal_CheckoutIsValid(new Asset[] { asset }, mode)); }
/// <summary> /// <para>Checkout an asset or list of asset from the version control system.</para> /// </summary> /// <param name="assets">List of assets to checkout.</param> /// <param name="mode">Tell the Provider to checkout the asset, the .meta file or both.</param> /// <param name="asset">Asset to checkout.</param> public static Task Checkout(string[] assets, CheckoutMode mode) => Internal_CheckoutStrings(assets, mode);
static public Task Checkout(string asset, CheckoutMode mode, ChangeSet changeset) { return(Checkout(new string[] { asset }, mode, changeset)); }
public static bool CheckoutIsValid(AssetList assets, CheckoutMode mode) => Internal_CheckoutIsValid(assets.ToArray(), mode);
static public bool CheckoutIsValid(AssetList assets, CheckoutMode mode) { return(Internal_CheckoutIsValid(assets.ToArray(), mode)); }
public static bool CheckoutIsValid(Asset asset, CheckoutMode mode) { Asset[] assets = new Asset[] { asset }; return(Internal_CheckoutIsValid(assets, mode)); }
private static extern Task Internal_Checkout(Asset[] assets, CheckoutMode mode, ChangeSet changeset);
public static Task Checkout(string asset, CheckoutMode mode) { string[] assets = new string[] { asset }; return(Internal_CheckoutStrings(assets, mode)); }
private static extern Asset[] Internal_ConsolidateAssetList(Asset[] assets, CheckoutMode mode);
public static Task Checkout(UnityEngine.Object[] assets, CheckoutMode mode) { AssetList assetList = new AssetList(); for (int i = 0; i < assets.Length; i++) { UnityEngine.Object assetObject = assets[i]; string assetPath = AssetDatabase.GetAssetPath(assetObject); Asset assetByPath = Provider.GetAssetByPath(assetPath); assetList.Add(assetByPath); } return Provider.Internal_Checkout(assetList.ToArray(), mode); }