用于粒子系统的 MainModule 的脚本接口。
cullingMode | 配置在粒子系统处于屏幕外时是否仍每帧模拟它。 |
customSimulationSpace | 相对于自定义变换组件模拟粒子。 |
duration | 粒子系统持续时间(秒)。 |
emitterVelocity | 当前粒子系统速度。 |
emitterVelocityMode | 控制粒子系统在世界中移动时的速度计算方式。 |
flipRotation | 使部分粒子朝相反方向旋转。 |
gravityModifier | 该粒子系统对重力的缩放,由 Physics.gravity 或 [Physics2D.gravity]] 定义。 |
gravityModifierMultiplier | 更改重力乘数。 |
gravitySource | 指定是否从 2D 或 3D 物理系统使用重力强度。 |
loop | 指定粒子系统是否循环。 |
maxParticles | 要发射的最大粒子数量。 |
playOnAwake | 如果设置为 true,则粒子系统将自动在启动时开始播放。 |
prewarm | 如果 ParticleSystem.MainModule.loop 为 true,则启用此属性后,粒子系统在第一次变为可见时看起来好像已模拟了一次循环。 |
ringBufferLoopRange | 当 ParticleSystem.MainModule.ringBufferMode 设置为循环时,此值定义循环的粒子寿命比例。 |
ringBufferMode | 配置粒子系统,当粒子的寿命超出后不结束它的粒子。 |
scalingMode | 控制粒子系统向其发射的粒子应用其 Transform 组件的方式。 |
simulationSpace | 这将选择模拟粒子所在的空间,它可以是世界空间或局部空间。 |
simulationSpeed | 覆盖粒子系统的默认播放速度。 |
startColor | 当粒子系统首次生成它们时的初始颜色。 |
startDelay | 以秒为单位的延迟时间。 |
startDelayMultiplier | 适用于 ParticleSystem.MainModule.startDelay 的(以秒为单位的)倍数。 |
startLifetime | 每个新粒子所具有的以秒为单位的总生命周期。 |
startLifetimeMultiplier | 适用于 ParticleSystem.MainModule.startLifetime 的倍数。 |
startRotation | 当粒子系统首次生成它们时的初始旋转。 |
startRotation3D | 启用 3D 粒子旋转的标志。 |
startRotationMultiplier | 适用于 ParticleSystem.MainModule.startRotation 的倍数。 |
startRotationX | 发射时围绕 x 轴的粒子初始旋转。 |
startRotationXMultiplier | 当粒子系统首次生成它们时,围绕 x 轴的粒子初始旋转倍数。 |
startRotationY | 当粒子系统首次生成它们时,围绕 y 轴的粒子初始旋转。 |
startRotationYMultiplier | 当粒子系统首次生成它们时,围绕 y 轴的粒子初始旋转倍数。 |
startRotationZ | 当粒子系统首次生成它们时,围绕 z 轴的粒子初始旋转 |
startRotationZMultiplier | 当粒子系统首次生成它们时,围绕 z 轴的粒子初始旋转倍数。 |
startSize | 当粒子系统首次生成它们时的粒子初始尺寸。 |
startSize3D | 单独为每个轴指定粒子尺寸的标志。 |
startSizeMultiplier | 当粒子系统首次生成它们时,粒子初始尺寸的倍数。 |
startSizeX | 当粒子系统首次生成它们时,沿 x 轴的粒子初始尺寸。 |
startSizeXMultiplier | 适用于 ParticleSystem.MainModule.startSizeX 的倍数。 |
startSizeY | 当粒子系统首次生成它们时,沿 y 轴的粒子初始尺寸。 |
startSizeYMultiplier | 适用于 ParticleSystem.MainModule.startSizeY 的倍数。 |
startSizeZ | 当粒子系统首次生成它们时,沿 z 轴的粒子初始尺寸。 |
startSizeZMultiplier | 适用于 ParticleSystem.MainModule.startSizeZ 的倍数。 |
startSpeed | 当粒子系统首次生成它们时的粒子初始速度。 |
startSpeedMultiplier | 适用于 ParticleSystem.MainModule.startSpeed 的倍数。 |
stopAction | 在粒子系统停止并且所有粒子都消失时,选择停用或销毁 GameObject,或调用 MonoBehaviour.OnParticleSystemStopped 脚本回调。 |
useUnscaledTime | 为 true 时,使用非缩放增量时间模拟粒子系统。否则,使用缩放增量时间。 |
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.