使用样本库可重用、保存和共享颜色、渐变和动画曲线。可在拾色器 (Color Picker)、渐变编辑器 (Gradient Editor) 和曲线编辑器 (Curve Editor) 中保存和选择样本。
样本库是保存在文件中的样本集合。Swatches 部分一次显示一个样本库。
要保存样本,请执行以下操作:
拖放样本可更改其顺序。右键单击样本可将其移动到顶部、对进行替换、重命名或删除。也可以通过按住 Alt/Option 并单击样本来将其删除。
使用 Swatches 中的下拉菜单:
默认情况下,Unity 将样本库保存在用户偏好设置中。也可以在项目中保存样本库。Unity 将项目样本库保存在 Assets 文件夹的 Editor 文件夹中。要在用户之间共享项目样本库,或将样本库包含在资源包中,请将它们添加到修订控制存储库中。
要编辑项目样本库,请执行以下操作:
2018–04–19 页面已修订并进行了编辑审查
预设库在 2018.1 版中重命名为样本库
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.