Version: 2021.3
언어: 한국어
public static VersionControl.Task Submit (VersionControl.ChangeSet changeset, VersionControl.AssetList list, string description, bool saveOnly);

파라미터

changeset The changeset to submit.
list The list of assets to submit.
description The description of the changeset.
saveOnly If true then only save the changeset to be submitted later.

설명

Starts a task that submits the assets to version control.

In version control systems like Git new changes have to be committed and then pushed to the repository separately. In Perforce or Plastic SCM a submit is an all in one task that both commits and pushes the newly made changes all at once.

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

public class EditorScript : MonoBehaviour { [MenuItem("Version Control/Submit")] public static void ExampleSubmit() { AssetList assets = new AssetList(); assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs")); Task t = Provider.Submit(new ChangeSet(), assets, "Example Description", saveOnly: false); t.Wait(); } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961