如果 AnimatorStateTransition.hasExitTime 为 true,则 **exitTime** 表示过渡可以生效的准确时间。\ 这是以标准化时间表示的,因此,举例来说,退出时间 0.75 意味着在第一帧上如果已播放了 75% 的动画,Exit Time 条件就会为 true。在下一帧上,该条件为 false。\ 对于循环动画,退出时间小于 1 的过渡在每个循环都会评估,因此可使用此选项在每个循环的动画中以适当时机对过渡进行计时。\ 退出时间大于 1 的过渡只会评估一次,因此可以用来在特定时间退出(完成固定循环次数后)。例如,退出时间为 3.5 的过渡只会在三个半循环后评估一次。
**已知限制:** 至少需要评估一次状态,然后才能触发 exitTime 条件,这意味着 exitTime 0 将永远不会在第一帧触发。
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.