Particle System 模块包含影响整个系统的全局属性。大多数这些属性用于控制新创建的粒子的初始状态。要展开和折叠主模块,请单击 Inspector 窗口中的 Particle System 栏。
The name of the module appears in the inspector as the name of the GameObject that the Particle System component is attached to.
属性 | 功能 |
---|---|
Duration | 系统运行的时间长度。 |
Looping | 如果启用此属性,系统将在其持续时间结束时再次启动并继续重复该循环。 |
Prewarm | 如果启用此属性,系统将初始化,就像已经完成一个完整周期一样(仅当 Looping 也启用时才有效)。 |
Start Delay | 启用此属性后,系统开始发射前将延迟一段时间(以秒为单位)。 |
Start Lifetime | 粒子的初始生命周期。 |
Start Speed | 每个粒子在适当方向的初始速度。 |
3D Start Size | 如果要分别控制每个轴的大小,请启用此属性。 |
Start Size | 每个粒子的初始大小。 |
3D Start Rotation | 如果要分别控制每个轴的旋转,请启用此属性。 |
Start Rotation | 每个粒子的初始旋转角度。 |
Randomize Rotation Direction | 使一些粒子以相反的方向旋转。 |
Start Color | 每个粒子的初始颜色。 |
Gravity Modifier | Scales the gravity value set in the physics manager. A value of zero will switch gravity off. |
Simulation Space | 控制粒子的运动位置是在父对象的局部空间中(因此与父对象一起移动)、在世界空间中还是相对于自定义对象(与您选择的自定义对象一起移动)。 |
Simulation Speed | 调整整个系统更新的速度。 |
Delta Time | Choose between Scaled and Unscaled, where Scaled will use the Time Scale value in the Time Manager, and Unscaled will ignore it. This is useful for Particle Systems that appear on a Pause Menu, for example. |
Scaling Mode | Choose how to use the scale from the transform. Set to Hierarchy, Local or Shape. Local applies only the Particle System transform scale, ignoring any parents. Shape mode applies the scale to the start positions of the particles, but does not affect their size. |
Play on Awake | 如果启用此属性,则粒子系统会在创建对象时自动启动。 |
Emitter_Velocity | 选择粒子系统如何计算 Inherit Velocity 和 Emission 模块使用的速度。系统可使用刚体组件(如果存在)或通过跟踪变换组件的移动情况来计算速度。 |
Max Particles | The maximum number of particles in the system at once. If the limit is reached, some particles will be removed. |
Auto Random Seed | If enabled, the Particle System will look different each time it is played. When set to false, the system will be exactly the same every time it is played. |
Random Seed | 禁用自动随机种子时,此值用于创建唯一的可重复效果。 |
Stop Action | When all the particles belonging to the system have finished, it is possible to make the system perform an action. |
Disable | The GameObject will be disabled. |
Destroy | The GameObject will be destroyed. |
系统会在特定时间内发射粒子,并可使用 Looped 属性将其设置为连续发射。此设置可让您设置间歇或连续发射粒子;例如,一个对象可能以短暂间隔或以稳定流的形式发射烟雾。
The Start properties (lifetime, speed, size, rotation and color) specify the state of a particle on emission. You can specify a particle’s width, height and depth independently, using the 3D Start Size property (see Non-uniform particle scaling, below).
所有粒子系统都使用 Physics 设置中指定的相同重力矢量。Gravity Multiplier 值可用于缩放重力,或者如果设置为零则将其关闭。
The Simulation Space property determines whether the particles move with the Particle System parent object, a custom object, or independently in the game world. For example, systems like clouds, hoses and flamethrowers will need to be set independently of their parent object, as they tend to leave trails that persist in the world space even if the object producing them moves around. On the other hand, if particles are used to create a spark between two electrodes, the particles should move along with the parent object. For more advanced control over how particles follow their Transform, see documentation on the Inherit Velocity module.
3D Start Size 属性允许您独立指定粒子的宽度、高度和深度。在粒子系统__主__模块中,选中 3D Start Size 复选框,然后输入粒子的初始 x(宽度)、y(高度)和 z(深度)的值。请注意,z(深度)仅适用于 3D 网格粒子。此外,还可在两个常量或曲线之间的范围内为这些属性设置随机值。
您可以在粒子系统__主__模块中设置粒子的初始大小,并使用 Size over Lifetime 模块中的 Separate Axes 选项设置粒子在其生命周期内的大小。此外,还可使用 Size by Speed 模块中的 Separate Axes 选项设置粒子的大小与其速度的关系。