list | 将传递给签出命令的资源的列表。可以在回调中对此列表移除或添加资源。 |
changesetID | 将此设置为现有变更集的 ID,以签出该变更集中列出的资源。如果找不到与指定 ID 匹配的变更集,则会阻止签出并引发错误消息。请勿同时设置此内容和 changesetDescription 参数(不支持此操作,会引发错误)。 |
changesetDescription | 若要在新变更集中签出资源,请设置此描述字符串。此操作会创建新变更集,在其中打开资源。请勿同时设置此描述字符串和变更集 ID 参数。同时设置两者会导致错误。 |
在版本控制签出之前要调用的用户提供的回调的委托。
可以设置 PreCheckoutCallback 以启用以下内容:
通过从回调返回 true 来允许签出。
通过从回调返回 false 来阻止签出。
修改要签出的资源的列表(可能希望阻止签出特定资源,或确保签出特定资源)。
将签出重定向到现有变更集。
创建新变更集以接收签出的资源。
注意:
AssetList 是绝对的 - 资源和/或其元文件在此回调返回之后不会自动添加。
同时设置 changesetID 和 changesetDescription 在理想情况下应允许重命名现有变更集(更改其描述),但是当前不支持此操作。
在 VCS 提供程序不支持变更集时尝试设置 changesetDescription 会引发错误。通过调用 Provider.hasChangelistSupport 来检查支持。
不得在此回调内调用会导致创建进一步签出操作的任何代码,因为这会导致可能无限的递归。
请注意域重新加载。如果在任何时候都可能重新加载程序集,则需要使用所选回调再次设置 Provider.preCheckoutCallback。
另请参阅:Provider.preCheckoutCallback、Provider.Checkout、AssetDatabase.MakeEditable。
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.