该模块根据粒子生成时发射器的速度控制每个粒子的初始生命周期。它将粒子的初始生命周期乘以一个值,该值取决于产生它们的对象的速度。对于大多数粒子系统,此为游戏对象速度,但对于子发射器,速度来自子发射器粒子所源自的父粒子。
This module is part of the Particle System component. When you create a new Particle System GameObject, or add a Particle System component to an exiting GameObject, Unity adds the Lifetime by Emitter Speed module to the Particle System. By default, Unity disables this module. To create a new Particle System and enable this module:
Since this module is part of the Particle System component, you access it through the ParticleSystem class. For information on how to access it and change values at runtime, see the Lifetime by Emitter Speed module API documentation.
For some properties in this section, you can use different modes to set their value. For information on the modes you can use, see Varying properties over time.
属性 | 功能 |
---|---|
Multiplier | 应用于粒子初始生命周期的乘数。该模块根据您设置的曲线模式以不同的方式使用此值。曲线模式为: &# 8226; Constant:使用您为此属性设置的常数乘数值。使用此曲线模式会忽略 Speed Range 属性。 • Curve:获取发射器的速度,根据 Speed Range 将其映射到 0 到 1 之间的值,然后使用归一化值对曲线进行采样。 • Random Between Two Constants:为每个粒子设置介于您为此属性设置的两个值之间的随机乘数。使用此曲线模式会忽略 Speed Range 属性。 • Random Between Two Curves:获取发射器的速度,根据 Speed Range 将其映射到 0 到 1 之间的值,然后使用归一化值对每条曲线进行采样。对于每个粒子,该模块将乘数设置为两个样本之间的随机值。 |
Speed Range | 粒子系统映射到 Multiplier 曲线的值的最小和最大发射器速度。如果发射器的速度等于第一个值,则乘数是曲线起始处的值。如果发射器的速度等于第二个值,则乘数是曲线末端的值。 此属性仅在 Multiplier 的曲线模式设置为 Curve 或者 Random Between Two Curves 时才相关。 |
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.