Struct TriggerModule

Source
pub struct TriggerModule {
Show 14 fields pub enabled: bool, pub enter: i32, pub exit: i32, pub inside: i32, pub outside: i32, pub radiusScale: f32, pub colliderQueryMode: Option<i32>, pub collisionShape0: Option<PPtr>, pub collisionShape1: Option<PPtr>, pub collisionShape2: Option<PPtr>, pub collisionShape3: Option<PPtr>, pub collisionShape4: Option<PPtr>, pub collisionShape5: Option<PPtr>, pub primitives: Option<Vec<PPtr>>,
}
Expand description

TriggerModule is a sub class of the Unity engine since version 5.4.0f3. Exert from Unity’s scripting documentation: Script interface for the TriggerModule. This module is useful for killing particles when they touch a set of collision shapes, or for calling a script command to let you apply custom particle behaviors when the trigger is activated.The example code for MonoBehaviour.OnParticleTrigger shows how the callback type action works.See Also: ParticleSystem, ParticleSystem.trigger.

Fields§

§enabled: bool

Specifies whether the TriggerModule is enabled or disabled.

§enter: i32

Choose what action to perform when particles enter the trigger volume.

§exit: i32

Choose what action to perform when particles leave the trigger volume.

§inside: i32

Choose what action to perform when particles are inside the trigger volume.

§outside: i32

Choose what action to perform when particles are outside the trigger volume.

§radiusScale: f32

A multiplier Unity applies to the size of each particle before it processes overlaps.

§colliderQueryMode: Option<i32>

Determines whether collider information is available when calling [[ParticleSystem::GetTriggerParticles]]. i32: (2020.2.0b1 - 2022.3.2f1)

§collisionShape0: Option<PPtr>

PPtr<Component>: (5.4.0f3 - 2020.2.0a13)

§collisionShape1: Option<PPtr>

PPtr<Component>: (5.4.0f3 - 2020.2.0a13)

§collisionShape2: Option<PPtr>

PPtr<Component>: (5.4.0f3 - 2020.2.0a13)

§collisionShape3: Option<PPtr>

PPtr<Component>: (5.4.0f3 - 2020.2.0a13)

§collisionShape4: Option<PPtr>

PPtr<Component>: (5.4.0f3 - 2020.2.0a13)

§collisionShape5: Option<PPtr>

PPtr<Component>: (5.4.0f3 - 2020.2.0a13)

§primitives: Option<Vec<PPtr>>

Vec<PPtr<Component>>: (2020.2.0b1 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for TriggerModule

Source§

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

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

impl<'de> Deserialize<'de> for TriggerModule

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 TriggerModule

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> Same for T

Source§

type Output = T

Should always be Self
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>,