Documentation

Unity Engine

Download Unity

Unity Engine

GetLatest

Starts a task that gets the latest version of a list of assets from the version control server.
Read time 1 minuteLast updated 11 days ago

Definition

GetLatest(AssetList)

Starts a task that gets the latest version of a list of assets from the version control server.
public static Task GetLatest(AssetList assets)

Parameters

assets

The list of assets to update.

Returns

Type

Description

TaskThe task that gets the latest version of the assets.

Remarks

This task doesn't resolve file conflicts. To resolve conflicts, use Provider.Resolve as well.

Examples

using System.Collections.Generic;using UnityEditor;using UnityEditor.VersionControl;using UnityEngine;public class EditorScript : MonoBehaviour{ [MenuItem("Version Control/GetLatest")] public static void ExampleGetLatest() { AssetList assets = new AssetList(); assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs")); Task t = Provider.GetLatest(assets); t.Wait(); }}

GetLatest(Asset)

Starts a task that gets the latest version of a single asset from the version control server.
public static Task GetLatest(Asset asset)

Parameters

asset

The asset to update.

Returns

Type

Description

TaskThe task that gets the latest version of the asset.

Remarks

This task doesn't resolve file conflicts. To resolve conflicts, use Provider.Resolve as well.