粒子系统 MainModule 的脚本接口。
cullingMode | 配置粒子系统在屏幕外时是否仍然会在每个帧中进行模拟。 |
customSimulationSpace | 模拟相对于自定义变换组件的粒子。 |
duration | 粒子系统的持续时间(以秒为单位)。 |
emitterVelocityMode | 控制粒子系统在世界中移动时如何计算其速度。 |
flipRotation | 使一些粒子以相反的方向旋转。 |
gravityModifier | 此粒子系统应用到重力(Physics.gravity 定义的)的缩放。 |
gravityModifierMultiplier | 更改重力乘数。 |
loop | 指定粒子系统是否在循环。 |
maxParticles | 要发射的最大粒子数。 |
playOnAwake | 如果设置为 true,则粒子系统会在启动时自动开始播放。 |
prewarm | 如果 ParticleSystem.MainModule.loop 为 true,启用此属性时,粒子系统在首次变为可见时,看似已模拟了一个循环。 |
ringBufferLoopRange | 当 ParticleSystem.MainModule.ringBufferMode 设置为循环时,此值定义粒子生命周期中的循环比例。 |
ringBufferMode | 将粒子系统配置为在其生命周期结束时不销毁其粒子。 |
scalingMode | 控制粒子系统对所发射的粒子应用其变换组件的方式。 |
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,还是调用 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.