TrailModule

Struct TrailModule 

Source
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: MinMaxGradient

The gradient that controls the trail colors during the lifetime of the attached particle.

§colorOverTrail: MinMaxGradient

The gradient that controls the trail colors over the length of the trail.

§dieWithParticles: bool

Specifies 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: bool

Specifies whether the TrailModule is enabled or disabled.

§inheritParticleColor: bool

Toggle whether the trail inherits the particle color as its starting color.

§lifetime: MinMaxCurve

The curve describing the trail lifetime, throughout the lifetime of the particle.

§minVertexDistance: f32

Set the minimum distance each trail can travel before the system adds a new vertex to it.

§ratio: f32

Choose what proportion of particles receive a trail.

§sizeAffectsLifetime: bool

Set whether the particle size acts as a multiplier on top of the trail lifetime.

§sizeAffectsWidth: bool

Set whether the particle size acts as a multiplier on top of the trail width.

§textureMode: i32

Choose whether the U coordinate of the trail Texture is tiled or stretched.

§widthOverTrail: MinMaxCurve

The curve describing the width of each trail point.

§worldSpace: bool

Drop 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)

Trait Implementations§

Source§

impl Debug for TrailModule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TrailModule

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TrailModule

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,