了解粒子系统一种通过在场景中生成并动态显示大量 2D 小图像来模拟流体(如液体、云和火焰)的组件。 更多信息
请参阅 词汇如何根据粒子的速度或寿命来改变粒子的旋转。
按速度着色模块可以根据粒子每秒距离单位的速度来改变粒子的颜色。
燃烧或发光的粒子(例如火花)在空气中快速移动时往往燃烧得更亮(例如,当火星暴露在更多氧气中时),然后当它们变慢时会略微变暗。为了模拟这一点,您可以使用按速度着色具有白色在速度范围上端和红色在下端(在火花示例中,较快的粒子将显示为白色,而较慢的粒子为红色)的渐变。
随时间推移而变色模块可以根据粒子的存在时间来改变粒子的颜色。
随着时间的推移,许多类型的自然和奇幻粒子会变色,因此此属性有许多用途。例如,白色发光的火星在穿过空气时会冷却,而魔法咒语可能会变成彩虹色。然而,同样重要的是 α(透明度)的变化。随着粒子达到其生命结束时(例如,大量火花、烟花和烟雾粒子),常常会燃烧殆尽、消失或消散,而简单的递减梯度会产生这种效果。
同时使用启动颜色属性时,此模块将将 2 种颜色相乘,以获得最终的粒子颜色。
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.