pub struct ShapeModule {Show 39 fields
pub angle: f32,
pub enabled: bool,
pub m_Mesh: PPtr,
pub placementMode: i32,
pub radius: Enum_f32__MultiModeParameter,
pub _type: Option<i32>,
pub alignToDirection: Option<bool>,
pub arc: Option<Enum_f32__MultiModeParameter>,
pub boxThickness: Option<Vector3f>,
pub boxX: Option<f32>,
pub boxY: Option<f32>,
pub boxZ: Option<f32>,
pub donutRadius: Option<f32>,
pub length: Option<f32>,
pub m_MeshMaterialIndex: Option<i32>,
pub m_MeshNormalOffset: Option<f32>,
pub m_MeshRenderer: Option<PPtr>,
pub m_MeshScale: Option<f32>,
pub m_MeshSpawn: Option<MultiModeParameter>,
pub m_Position: Option<Vector3f>,
pub m_Rotation: Option<Vector3f>,
pub m_Scale: Option<Vector3f>,
pub m_SkinnedMeshRenderer: Option<PPtr>,
pub m_Sprite: Option<PPtr>,
pub m_SpriteRenderer: Option<PPtr>,
pub m_Texture: Option<PPtr>,
pub m_TextureAlphaAffectsParticles: Option<bool>,
pub m_TextureBilinearFiltering: Option<bool>,
pub m_TextureClipChannel: Option<i32>,
pub m_TextureClipThreshold: Option<f32>,
pub m_TextureColorAffectsParticles: Option<bool>,
pub m_TextureUVChannel: Option<i32>,
pub m_UseMeshColors: Option<bool>,
pub m_UseMeshMaterialIndex: Option<bool>,
pub radiusThickness: Option<f32>,
pub randomDirection: Option<bool>,
pub randomDirectionAmount: Option<f32>,
pub randomPositionAmount: Option<f32>,
pub sphericalDirectionAmount: Option<f32>,
}Expand description
ShapeModule is a sub class of the Unity engine since version 3.5.0. Exert from Unity’s scripting documentation: Script interface for the ShapeModule. Configures the initial positions and directions of particles.See Also: ParticleSystem, ParticleSystem.shape.
Fields§
§angle: f32Angle of the cone to emit particles from.
enabled: boolSpecifies whether the ShapeModule is enabled or disabled.
m_Mesh: PPtrMesh to emit particles from.
PPtr<Mesh>: (3.5.0 - 2022.3.2f1)
placementMode: i32§radius: Enum_f32__MultiModeParameterRadius of the shape to emit particles from.
_type: Option<i32>i32: (3.5.0 - 2022.3.2f1)
alignToDirection: Option<bool>Align particles based on their initial direction of travel. bool: (5.5.0f3 - 2022.3.2f1)
arc: Option<Enum_f32__MultiModeParameter>Angle of the circle arc to emit particles from. f32: (5.0.0f4 - 5.6.0b4); MultiModeParameter: (5.6.0f1 - 2022.3.2f1)
boxThickness: Option<Vector3f>Thickness of the box to emit particles from. Vector3f: (2017.1.0b2 - 2022.3.2f1)
boxX: Option<f32>f32: (3.5.0 - 2017.1.0b1)
boxY: Option<f32>f32: (3.5.0 - 2017.1.0b1)
boxZ: Option<f32>f32: (3.5.0 - 2017.1.0b1)
donutRadius: Option<f32>The thickness of the Donut shape to emit particles from. f32: (2017.1.0b2 - 2022.3.2f1)
length: Option<f32>Length of the cone to emit particles from. f32: (4.0.0 - 2022.3.2f1)
m_MeshMaterialIndex: Option<i32>Emit particles from a single Material of a Mesh. i32: (5.3.0f1 - 2022.3.2f1)
m_MeshNormalOffset: Option<f32>f32: (5.3.0f1 - 2022.3.2f1)
m_MeshRenderer: Option<PPtr>MeshRenderer to emit particles from.
PPtr<MeshRenderer>: (5.3.0f1 - 2022.3.2f1)
m_MeshScale: Option<f32>f32: (5.5.0f3 - 2017.1.0b1)
m_MeshSpawn: Option<MultiModeParameter>MultiModeParameter: (2018.3.0f2 - 2022.3.2f1)
m_Position: Option<Vector3f>Apply an offset to the position from which the system emits particles. Vector3f: (2017.1.0b2 - 2022.3.2f1)
m_Rotation: Option<Vector3f>Apply a rotation to the shape from which the system emits particles. Vector3f: (2017.1.0b2 - 2022.3.2f1)
m_Scale: Option<Vector3f>Apply scale to the shape from which the system emits particles. Vector3f: (2017.1.0b2 - 2022.3.2f1)
m_SkinnedMeshRenderer: Option<PPtr>SkinnedMeshRenderer to emit particles from.
PPtr<SkinnedMeshRenderer>: (5.3.0f1 - 2022.3.2f1)
m_Sprite: Option<PPtr>Sprite to emit particles from.
PPtr<Sprite>: (2018.2.0b1 - 2022.3.2f1)
m_SpriteRenderer: Option<PPtr>SpriteRenderer to emit particles from.
PPtr<SpriteRenderer>: (2018.2.0b1 - 2022.3.2f1)
m_Texture: Option<PPtr>Specifies a Texture to tint the particle’s start colors.
PPtr<Texture2D>: (2018.1.0b2 - 2022.3.2f1)
m_TextureAlphaAffectsParticles: Option<bool>When enabled, the system applies the alpha channel of the Texture to the particle alpha when the particle spawns. bool: (2018.1.0b2 - 2022.3.2f1)
m_TextureBilinearFiltering: Option<bool>When enabled, the system takes four neighboring samples from the Texture then combines them to give the final particle value. bool: (2018.1.0b2 - 2022.3.2f1)
m_TextureClipChannel: Option<i32>Selects which channel of the Texture to use for discarding particles. i32: (2018.1.0b2 - 2022.3.2f1)
m_TextureClipThreshold: Option<f32>Discards particles when they spawn on an area of the Texture with a value lower than this threshold. f32: (2018.1.0b2 - 2022.3.2f1)
m_TextureColorAffectsParticles: Option<bool>When enabled, the system applies the RGB channels of the Texture to the particle color when the particle spawns. bool: (2018.1.0b2 - 2022.3.2f1)
m_TextureUVChannel: Option<i32>When using a Mesh as a source shape type, this option controls which UV channel on the Mesh to use for reading the source Texture. i32: (2018.1.0b2 - 2022.3.2f1)
m_UseMeshColors: Option<bool>Modulate the particle colors with the vertex colors, or the Material color if no vertex colors exist. bool: (5.3.0f1 - 2022.3.2f1)
m_UseMeshMaterialIndex: Option<bool>Emit particles from a single Material, or the whole Mesh. bool: (5.3.0f1 - 2022.3.2f1)
radiusThickness: Option<f32>Radius thickness of the shape’s edge from which to emit particles. f32: (2017.1.0b2 - 2022.3.2f1)
randomDirection: Option<bool>bool: (3.5.0 - 5.4.6f3)
randomDirectionAmount: Option<f32>Randomizes the starting direction of particles. f32: (5.5.0f3 - 2022.3.2f1)
randomPositionAmount: Option<f32>Randomizes the starting position of particles. f32: (2017.1.0b2 - 2022.3.2f1)
sphericalDirectionAmount: Option<f32>Makes particles move in a spherical direction from their starting point. f32: (5.5.0f3 - 2022.3.2f1)