缩放约束组件会调整 游戏对象Unity 场景中的基本对象,可以表示角色、道具、场景、相机、路径点等等。游戏对象的功能由附加在其上的组件定义。 更多信息
参见 词汇表 的大小,使其与源游戏对象的缩放比例相匹配。
属性 | 功能 | |
---|---|---|
激活 | 调整约束的游戏对象及其源游戏对象的大小后,单击激活保存此信息。激活会保存当前与源游戏对象之间的偏移量到静止缩放比例和缩放偏移量,然后检查已激活和锁定。 | |
归零 | 将约束的游戏对象的旋转设置为源游戏对象。归零会重置静止缩放比例和缩放偏移量字段,然后检查已激活和锁定。 | |
已激活 | 切换是否评估约束。要同时应用约束,请确保已选中锁定。 | |
权重 | 约束的强度。权重为 1 会使约束以与源游戏对象相同的速率调整此游戏对象的大小。权重为 0 会完全移除约束的效果。此权重会影响所有源游戏对象。源列表中的每个游戏对象也具有权重。 | |
约束设置 | ||
锁定 | 切换以使约束调整游戏对象的大小。取消选中此属性以编辑此游戏对象的缩放比例。您也可以编辑静止缩放比例和缩放偏移量属性。如果已选中已激活,则当您调整游戏对象或其源游戏对象的大小后,约束会为您更新静止缩放比例或缩放偏移量属性。当您对更改感到满意时,选中锁定以使约束控制此游戏对象。此属性在播放模式下无效。 | |
静止缩放比例 | 当权重为 0 或当相应的冻结缩放轴未选中时要使用的 X、Y 和 Z 值。要编辑这些字段,请取消选中锁定。 | |
缩放偏移量 | 约束施加的变换的 X、Y 和 Z 偏移量。要编辑这些字段,请取消选中锁定。 | |
冻结缩放轴 | 选中 X、Y 或 Z 以允许约束控制相应的轴。取消选中轴以停止约束控制它。这使您可以编辑、动画或脚本化未冻结的轴。 | |
源 | 约束此游戏对象的游戏对象列表。每个源的权重在 0 到 1 之间。 |
2018-03-13 发布页面
约束在 2018.1 中添加
ScaleConstraint
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.