任务是对版本控制操作实例的描述。
通过此类型的对象,可以处理 Provider.Checkout、Provider.GetLatest 和 Provider.Submit 等操作。几乎每次要求 Provider 执行操作时,Unity 都会创建该项目。版本控制操作返回的任务对象在后台执行,并且不总是立即完成,如果需要等待它们完成,请使用 Task.Wait。
assetList | 多种任务的结果。 |
changeSets | 一些任务返回的变更集列表。 |
description | 当前任务的简短描述。 |
messages | 可能包含版本控制插件的信息。 |
progressPct | 当前任务的进度百分比。 |
resultCode | 一些任务会返回结果代码,这些代码将存储在此处。 |
secondsSpent | 自任务启动以来在此任务中花费的总时间。 |
success | 确定任务是否已成功完成。 |
text | 将包含 Provider.ChangeSetDescription 任务的结果。 |
SetCompletionAction | 完成任务后,执行一个完成任务(如果已设置)。 |
Wait | 一种阻塞方法,用于等待任务完成。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.