pub struct TrailModule {Show 20 fields
pub colorOverLifetime: MinMaxGradient,
pub colorOverTrail: MinMaxGradient,
pub dieWithParticles: bool,
pub enabled: bool,
pub inheritParticleColor: bool,
pub lifetime: MinMaxCurve,
pub minVertexDistance: f32,
pub ratio: f32,
pub sizeAffectsLifetime: bool,
pub sizeAffectsWidth: bool,
pub textureMode: i32,
pub widthOverTrail: MinMaxCurve,
pub worldSpace: bool,
pub attachRibbonsToTransform: Option<bool>,
pub generateLightingData: Option<bool>,
pub mode: Option<i32>,
pub ribbonCount: Option<i32>,
pub shadowBias: Option<f32>,
pub splitSubEmitterRibbons: Option<bool>,
pub textureScale: Option<Vector2f>,
}Expand description
TrailModule is a sub class of the Unity engine since version 5.5.0f3. Exert from Unity’s scripting documentation: Script interface for the TrailsModule. This module adds trails to your particles. For example, you can make the trails stay in the wake of particles as they move, or make them connect each particle in the system together.See Also: ParticleSystem, ParticleSystem.trails.
Fields§
§colorOverLifetime: MinMaxGradientThe gradient that controls the trail colors during the lifetime of the attached particle.
colorOverTrail: MinMaxGradientThe gradient that controls the trail colors over the length of the trail.
dieWithParticles: boolSpecifies whether trails disappear immediately when their owning particle dies. When false, each trail persists until all its points have naturally expired, based on its lifetime.
enabled: boolSpecifies whether the TrailModule is enabled or disabled.
inheritParticleColor: boolToggle whether the trail inherits the particle color as its starting color.
lifetime: MinMaxCurveThe curve describing the trail lifetime, throughout the lifetime of the particle.
minVertexDistance: f32Set the minimum distance each trail can travel before the system adds a new vertex to it.
ratio: f32Choose what proportion of particles receive a trail.
sizeAffectsLifetime: boolSet whether the particle size acts as a multiplier on top of the trail lifetime.
sizeAffectsWidth: boolSet whether the particle size acts as a multiplier on top of the trail width.
textureMode: i32Choose whether the U coordinate of the trail Texture is tiled or stretched.
widthOverTrail: MinMaxCurveThe curve describing the width of each trail point.
worldSpace: boolDrop new trail points in world space, regardless of Particle System Simulation Space.
attachRibbonsToTransform: Option<bool>Adds an extra position to each ribbon, connecting it to the location of the Transform Component. bool: (2018.3.0f2 - 2022.3.2f1)
generateLightingData: Option<bool>Configures the trails to generate Normals and Tangents. With this data, Scene lighting can affect the trails via Normal Maps and the Unity Standard Shader, or your own custom-built Shaders. bool: (2017.1.0b2 - 2022.3.2f1)
mode: Option<i32>Choose how the system generates the particle trails. i32: (2017.3.0b1 - 2022.3.2f1)
ribbonCount: Option<i32>Select how many lines to create through the Particle System. i32: (2017.3.0b1 - 2022.3.2f1)
shadowBias: Option<f32>Apply a shadow bias to prevent self-shadowing artifacts. The specified value is the proportion of the trail width at each segment. f32: (2018.3.0f2 - 2022.3.2f1)
splitSubEmitterRibbons: Option<bool>Specifies whether, if you use this system as a sub-emitter, ribbons connect particles from each parent particle independently. bool: (2017.3.0b1 - 2022.3.2f1)
textureScale: Option<Vector2f>A multiplier for the UV coordinates of the trail texture. Vector2f: (2022.1.0b1 - 2022.3.2f1)