在此模块中可设置子发射器。这些子发射器是在粒子生命周期的某些阶段在粒子位置处创建的附加粒子发射器。
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 Sub Emitters 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 Sub Emitters 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.
属性 | 功能 |
---|---|
Sub Emitters | 配置一个子发射器列表,并选择它们的触发条件以及它们从父粒子继承的属性。 |
许多类型的粒子都会在其生命周期的不同阶段产生一些效果,而这也可使用粒子系统来实现。例如,子弹离开枪管时可能伴随着一缕烟尘,火球可能会在撞击时爆炸。您可以使用子发射器来创建诸如此类的效果。
子发射器是在场景中创建的或来自预制件的普通粒子系统对象。这意味着子发射器还可以有自己的子发射器(这种类型的布置对于像烟花这样的复杂效果很有用)。但是,虽然使用子发射器生成大量粒子非常容易,但这可能非常耗费资源。
要触发子发射器,可使用以下条件:
请注意,__Collision、Trigger、Death__ 和 Manual 事件只能使用 Emission 模块中的爆发发射。
此外,还可使用 Inherit 选项将属性从父粒子转移到每个新创建的粒子。可转移属性包括大小、旋转、颜色和生命周期。要控制速度的继承方式,请在子发射器系统上配置 Inherit Velocity 模块。
还可以通过设置 Emit Probability 属性来配置子发射器事件的触发概率。值为 1 可以保证事件将触发,而更小的值则会降低概率。
2018–03–28 页面已修订
在 2018.1 版中的 Sub Emitters 模块的条件列表中添加了“Trigger”和“Manual”条件 NewIn20181
在 2018.3 版中向粒子 Sub Emitters 模块添加了 Emit Probability 属性 NewIn20183
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.