Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Particles
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UFXSystemComponent
- UParticleSystemComponent
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Particles/ParticleSystemComponent.h |
| Include | #include "Particles/ParticleSystemComponent.h" |
Syntax
UCLASS (ClassGroup=(Rendering), HideCategories=Object, HideCategories=Physics,
HideCategories=Collision, ShowCategories=Trigger, EditInlineNew,
Meta=(BlueprintSpawnableComponent, DisplayName="Cascade Particle System Component"),
MinimalAPI)
class UParticleSystemComponent : public UFXSystemComponent
Remarks
A particle emitter.
Variables
| Type | Name | Description | |
|---|---|---|---|
| float | AccumLODDistanceCheckTime | LOD updating... | |
| float | AccumTickTime | Used to accumulate total tick time to determine whether system can be skipped ticking if not visible. | |
| EAttachmentRule | AutoAttachLocationRule | Options for how we handle our location when we attach to the AutoAttachParent, if bAutoManageAttachment is true. | |
| TWeakObjectPtr< USceneComponent > | AutoAttachParent | Component we automatically attach to when activated, if bAutoManageAttachment is true. | |
| EAttachmentRule | AutoAttachRotationRule | Options for how we handle our rotation when we attach to the AutoAttachParent, if bAutoManageAttachment is true. | |
| EAttachmentRule | AutoAttachScaleRule | Options for how we handle our scale when we attach to the AutoAttachParent, if bAutoManageAttachment is true. | |
| FName | AutoAttachSocketName | Socket we automatically attach to on the AutoAttachParent, if bAutoManageAttachment is true. | |
| uint8: 1 | bAllowRecycling | If true, this Particle System will be available for recycling after it has completed. | |
| uint8: 1 | bAutoAttachWeldSimulatedBodies | Option for how we handle bWeldSimulatedBodies when we attach to the AutoAttachParent, if bAutoManageAttachment is true. | |
| uint8: 1 | bAutoDestroy | ||
| uint8: 1 | bAutoManageAttachment | True if we should automatically attach to AutoAttachParent when activated, and detach from our parent when completed. | |
| uint8: 1 | bDeactivateTriggered | If true, someone has requested this component deactivate. | |
| uint8: 1 | bForcedInActive | This is set when any of our "don't tick me" timeout values have fired | |
| uint8: 1 | bForceLODUpdateFromRenderer | If true, force an LOD update from the renderer. | |
| uint8: 1 | bHasBeenActivated | This flag will be set the first time the PSysComp is activated... | |
| uint8: 1 | bIsDuringRegister | ||
| uint8: 1 | bIsManagingSignificance | If this component is having it's significance managed by gameplay code. | |
| uint8: 1 | bIsViewRelevanceDirty | If true, the ViewRelevanceFlags are dirty and should be recached | |
| uint8: 1 | bJustRegistered | Indicates that the component has not been ticked since being registered. | |
| bool | bOldPositionValid | ||
| uint8: 1 | bOverrideLODMethod | Indicates that the component's LODMethod overrides the Template's | |
| uint8: 1 | bResetOnDetach | ||
| uint8: 1 | bResetTriggered | If true, someone has requested this component reset. | |
| uint8: 1 | bSkipUpdateDynamicDataDuringTick | Flag indicating that dynamic updating of render data should NOT occur during Tick. | |
| uint8: 1 | bSuppressSpawning | ||
| uint8: 1 | bUpdateOnDedicatedServer | Whether to update the particle system on dedicated servers | |
| TArray< struct FParticleEventBurstData > | BurstEvents | The Burst events that occurred in this PSysComp. | |
| uint8: 1 | bWarmingUp | ||
| uint8: 1 | bWasActive | True if this was active before being unregistered or otherwise reset, if so reactivate it | |
| uint8: 1 | bWasCompleted | ||
| uint8: 1 | bWasDeactivated | ||
| uint8: 1 | bWasManagingSignificance | If this component was previously having it's significance managed by gameplay code. | |
| TArray< FMaterialRelevance > | CachedViewRelevanceFlags | The view relevance flags for each LODLevel. | |
| TArray< struct FParticleEventCollideData > | CollisionEvents | The Collision events that occurred in this PSysComp. | |
| float | CustomTimeDilation | Scales DeltaTime in UParticleSystemComponent::Tick(...) | |
| TArray< struct FParticleEventDeathData > | DeathEvents | The Death events that occurred in this PSysComp. | |
| int32 | EditorDetailMode | Used for applying Cascade's detail mode setting to in-level particle systems | |
| int32 | EditorLODLevel | INTERNAL. Used by the editor to set the LODLevel | |
| float | EmitterDelay | This is created at start up and then added to each emitter | |
| TArray< struct FParticleEmitterInstance * > | EmitterInstances | ||
| TArray< TObjectPtr< class UMaterialInterface > > | EmitterMaterials | ||
| FFXSystem * | FXSystem | ||
| TArray< struct FParticleSysParam > | InstanceParameters | Array holding name instance parameters for this ParticleSystemComponent. | |
| TArray< struct FParticleEventKismetData > | KismetEvents | The Kismet events that occurred for this PSysComp. | |
| float | LastSignificantTime | Time in seconds since we were last considered significant. | |
| TEnumAsByte< enum ParticleSystemLODMethod > | LODMethod | The method of LOD level determination to utilize for this particle system | |
| float | MaxTimeBeforeForceUpdateTransform | Time between forced UpdateTransforms for systems that use dynamically calculated bounds, Which is effectively how often the bounds are shrunk. | |
| FVector | OldPosition | ||
| FParticleBurstSignature | OnParticleBurst | ||
| FParticleCollisionSignature | OnParticleCollide | ||
| FParticleDeathSignature | OnParticleDeath | ||
| FParticleSpawnSignature | OnParticleSpawn | ||
| FOnSystemFinished | OnSystemFinished | Called when the particle system is done. | |
| FVector | PartSysVelocity | ||
| EPSCPoolMethod | PoolingMethod | If this PSC is pooling. | |
| FRandomStream | RandomStream | Stream of random values to use with this component | |
| FRenderCommandFence * | ReleaseResourcesFence | Command fence used to shut down properly | |
| int32 | ReplayClipIDNumber | Clip ID number we're either playing back or capturing to, depending on the value of ReplayState. | |
| TArray< TObjectPtr< class UParticleSystemReplay > > | ReplayClips | Array of replay clips for this particle system component. | |
| int32 | ReplayFrameIndex | The current replay frame for playback | |
| TEnumAsByte< enum ParticleReplayState > | ReplayState | Current particle 'replay state'. | |
| EParticleSignificanceLevel | RequiredSignificance | The significance this component requires of it's emitters for them to be enabled. | |
| float | SecondsBeforeInactive | Number of seconds of emitter not being rendered that need to pass before it no longer gets ticked/ becomes inactive. | |
| TArray< TObjectPtr< class USkeletalMeshComponent > > | SkelMeshComponents | The skeletal mesh components used with the socket location module. | |
| TArray< struct FParticleEventSpawnData > | SpawnEvents | The Spawn events that occurred in this PSysComp. | |
| TObjectPtr< class UParticleSystem > | Template | ||
| float | WarmupTickRate | ||
| float | WarmupTime |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UParticleSystemComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Auto-populate the instance parameters based on contained modules. | ||
| void | BeginTrails
(
FName InFirstSocketName, |
Begins all trail emitters in this component. | |
| bool | True if this component can be occluded. | ||
| bool | True if this component can be considered invisible and potentially culled. | ||
| bool | |||
| bool | Return true if this psys can tick in any thread | ||
| void | Clears dynamic data on the rendering thread. | ||
| void | ClearParameter
(
FName ParameterName, |
Clears the specified parameter, returning it to the default value set in the template | |
| void | Complete () |
||
| void | Decide if this psys can tick in any thread, and set bIsElligibleForAsyncTick | ||
| void | Possibly parallel phase of TickComponent | ||
| void | ConditionalCacheViewRelevanceFlags
(
UParticleSystem* NewTemplate |
Cache the view-relevance for each emitter at each LOD level if needed. | |
| FParticleDynamicData * | CreateDynamicData
(
ERHIFeatureLevel::Type InFeatureLevel |
Creates dynamic particle data for rendering the particle system this frame. | |
| FDynamicEmitterDataBase * | CreateDynamicDataFromReplay
(
FParticleEmitterInstance* EmitterInstance, |
Static: Supplied with a chunk of replay data, this method will create dynamic emitter data that can be used to render the particle system | |
| UMaterialInstanceDynamic * | CreateNamedDynamicMaterialInstance
(
FName InName, |
Creates a Dynamic Material Instance for the specified named material override, optionally from the supplied material. | |
| void | |||
| void | Deactivate the system | ||
| int32 | DetermineLODLevelForLocation
(
const FVector& EffectLocation |
This will determine which LOD to use based off the specific ParticleSystem passed in and the distance to where that PS is being displayed. | |
| bool | |||
| void | EndTrails () |
Ends all trail emitters in this component. | |
| void | After the possibly parallel phase of TickComponent, we fire events, etc | ||
| UParticleSystemReplay * | FindReplayClipForIDNumber
(
const int32 InClipIDNumber |
Finds the replay clip of the specified ID number | |
| void | ForceAsyncWorkCompletion
(
EForceAsyncWorkCompletion Behavior, |
If there is async work outstanding, force it to be completed now | |
| void | ForceAsyncWorkCompletion
(
EForceAsyncWorkCompletion Behavior, |
If there is async work outstanding, force it to be completed now | |
| void | ForceReset () |
||
| void | Force the component to update its bounding box. | ||
| void | GenerateParticleEvent
(
const FName InEventName, |
Record a kismet event. | |
| bool | GetActorParameter
(
const FName InName, |
Retrieve the Actor parameter value for the given name. | |
| bool | GetAnyVectorParameter
(
const FName InName, |
Retrieve the Vector parameter value for the given name...also looks for colors and floats and returns those | |
| float | GetApproxDistanceSquared
(
FVector Point |
Returns the approximate distance squared from this component to the passed location. | |
| const FBoxSphereBounds & | |||
| const FTransform & | |||
| const TArray< struct FParticleSysParam > & | |||
| const FVector & | |||
| bool | GetBeamEndPoint
(
int32 EmitterIndex, |
Get the beam end point | |
| bool | GetBeamSourcePoint
(
int32 EmitterIndex, |
Get the beam source point | |
| bool | GetBeamSourceStrength
(
int32 EmitterIndex, |
Get the beam source strength | |
| bool | GetBeamSourceTangent
(
int32 EmitterIndex, |
Get the beam source tangent | |
| bool | GetBeamTargetPoint
(
int32 EmitterIndex, |
Get the beam target point | |
| bool | GetBeamTargetStrength
(
int32 EmitterIndex, |
Get the beam target strength | |
| bool | GetBeamTargetTangent
(
int32 EmitterIndex, |
Get the beam target tangent | |
| bool | GetColorParameter
(
const FName InName, |
Retrieve the Color parameter value for the given name. | |
| int32 | Decide which detail mode should be applied to this particle system. | ||
| int32 | |||
| bool | GetFloatParameter
(
const FName InName, |
Retrieve the Float parameter value for the given name. | |
| int32 | GetLODLevel () |
Get the LOD level of the particle system | |
| const FVector3f & | GetLWCTile () |
||
| int32 | |||
| FPSCTickData & | |||
| bool | GetMaterialParameter
(
const FName InName, |
Retrieve the Material parameter value for the given name. | |
| UMaterialInterface * | GetNamedMaterial
(
FName InName |
Returns a named material. If this named material is not found, returns NULL. | |
| int32 | GetNamedMaterialIndex
(
FName InName |
Returns the index into the EmitterMaterials array for this named. | |
| FName | GetNameForMaterial
(
UMaterialInterface* InMaterial |
Returns the name associated with the passed in material, returns NAME_None if it is not found | |
| int32 | Get the current number of active particles in this system | ||
| void | GetOwnedTrailEmitters
(
TrailEmitterArray& OutTrailEmitters, |
Fills the passed array with all trail emitters associated with a particular object. | |
| FParticlePerfStatsContext | |||
| const TArray< FVector > & | |||
| const TArray< float > & | |||
| bool | GetVectorParameter
(
const FName InName, |
Retrieve the Vector parameter value for the given name. | |
| FParticleSystemWorldManager * | |||
| bool | HasCompleted () |
||
| void | |||
| void | If particles have not already been initialised (ie. EmitterInstances created) do it now. | ||
| int32 | |||
| int32 | |||
| bool | |||
| void | |||
| void | |||
| void | OnSignificanceChanged
(
bool bSignificant, |
When the overall significance for the component is changed. | |
| void | Orients the Z axis of the ParticleSystemComponent toward the camera while preserving the X axis direction | ||
| bool | ParticleLineCheck
(
FHitResult& Hit, |
Collision Handling... | |
| void | ReportEventBurst
(
const FName InEventName, |
Record a bursting event. | |
| void | ReportEventCollision
(
const FName InEventName, |
Record a collision event. | |
| void | ReportEventDeath
(
const FName InEventName, |
Record a death event. | |
| void | ReportEventSpawn
(
const FName InEventName, |
Event reporting... Record a spawning event. | |
| void | |||
| void | |||
| void | ResetParticles
(
bool bEmptyInstances |
||
| void | Stops the emitter, unregisters the component, and resets the component's properties to the values of its template | ||
| void | |||
| void | SetAutoAttachParams
(
USceneComponent* Parent, |
DEPRECATED: Set AutoAttachParent, AutoAttachSocketName, AutoAttachLocationType to the specified parameters. | |
| void | SetBeamEndPoint
(
int32 EmitterIndex, |
Beam-related script functions. Set the beam end point | |
| void | SetBeamSourcePoint
(
int32 EmitterIndex, |
Set the beam source point | |
| void | SetBeamSourceStrength
(
int32 EmitterIndex, |
Set the beam source strength | |
| void | SetBeamSourceTangent
(
int32 EmitterIndex, |
Set the beam source tangent | |
| void | SetBeamTargetPoint
(
int32 EmitterIndex, |
Set the beam target point | |
| void | SetBeamTargetStrength
(
int32 EmitterIndex, |
Set the beam target strength | |
| void | SetBeamTargetTangent
(
int32 EmitterIndex, |
Set the beam target tangent | |
| void | SetFloatRandParameter
(
FName ParameterName, |
Set a named random float instance parameter on this ParticleSystemComponent. | |
| void | SetLODLevel
(
int32 InLODLevel |
Set the LOD level of the particle system | |
| void | SetManagerHandle
(
int32 InHandle |
||
| void | SetManagingSignificance
(
bool bManageSignificance |
Called from game code when the component begins having it's significance managed. | |
| void | SetMaterialParameter
(
FName ParameterName, |
Set a named material instance parameter on this ParticleSystemComponent. | |
| void | SetPendingManagerAdd
(
bool bValue |
||
| void | SetPendingManagerRemove
(
bool bValue |
||
| void | SetRequiredSignificance
(
EParticleSignificanceLevel NewRequiredSignificance |
Called from game code when the significance required for a component changes. | |
| void | SetTemplate
(
UParticleSystem* NewTemplate |
Change the ParticleSystem used by this ParticleSystemComponent | |
| void | SetTrailSourceData
(
FName InFirstSocketName, |
Sets the defining data for all trails in this component. | |
| void | SetVectorRandParameter
(
FName ParameterName, |
Set a named random vector instance parameter on this ParticleSystemComponent. | |
| void | SetVectorUnitRandParameter
(
FName ParameterName, |
Set a named random unit vector instance parameter on this ParticleSystemComponent. | |
| bool | |||
| bool | Whether this component should have it's significance managed by game code. | ||
| void | |||
| void | UpdateInstances
(
bool bEmptyInstances |
||
| void |
Overridden from UFXSystemComponent
| Type | Name | Description | |
|---|---|---|---|
| void | ActivateSystem
(
bool bFlagAsJustAttached |
Activate the system | |
| void | Forces component to deactivate immediately. | ||
| uint32 | Returns an approximate memory usage value for this component. | ||
| UFXSystemAsset * | Get the referenced FXSystem asset. | ||
| void | Deactivates this system and releases it to the pool on completion. | ||
| void | SetActorParameter
(
FName ParameterName, |
Set a named actor instance parameter on this ParticleSystemComponent. | |
| void | SetAutoAttachmentParameters
(
USceneComponent* Parent, |
Set AutoAttachParent, AutoAttachSocketName, AutoAttachLocationRule, AutoAttachRotationRule, AutoAttachScaleRule to the specified parameters. | |
| void | SetBoolParameter
(
FName ParameterName, |
Set a named float instance parameter on this ParticleSystemComponent. | |
| void | SetColorParameter
(
FName ParameterName, |
Set a named color instance parameter on this ParticleSystemComponent. | |
| void | SetEmitterEnable
(
FName EmitterName, |
Enables/Disables a sub-emitter | |
| void | SetFloatParameter
(
FName ParameterName, |
Change a named float parameter | |
| void | SetIntParameter
(
FName ParameterName, |
Set a named float instance parameter on this ParticleSystemComponent. | |
| void | SetUseAutoManageAttachment
(
bool bAutoManage |
Sets whether we should automatically attach to AutoAttachParent when activated, and detach from our parent when completed. | |
| void | SetVectorParameter
(
FName ParameterName, |
Set a named vector instance parameter on this ParticleSystemComponent. |
Overridden from UPrimitiveComponent
| Type | Name | Description | |
|---|---|---|---|
| FPrimitiveSceneProxy * | Creates a proxy to represent the primitive to the scene manager in the rendering thread. | ||
| FBodyInstance * | GetBodyInstance
(
FName BoneName, |
Returns BodyInstance of the component. | |
| UMaterialInterface * | GetMaterial
(
int32 ElementIndex |
Returns the material used by the element at the specified index | |
| UMaterialInterface * | GetMaterialByName
(
FName MaterialSlotName |
Returns the material used by the element in the slot with the specified name. | |
| int32 | Return number of material elements in this primitive | ||
| void | GetStreamingRenderAssetInfo
(
FStreamingTextureLevelContext& LevelContext, |
Enumerates the streaming textures/meshes used by the primitive. | |
| void | GetUsedMaterials
(
TArray< UMaterialInterface* >& OutMaterials, |
Retrieves the materials used in this component | |
| void | SetMaterial
(
int32 ElementIndex, |
Changes the material applied to an element of the mesh. | |
| void | SetMaterialByName
(
FName MaterialSlotName, |
Changes the material applied to an element of the mesh. |
Overridden from USceneComponent
| Type | Name | Description | |
|---|---|---|---|
| FBoxSphereBounds | CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. | |
| bool | GetMaterialPropertyPath
(
int32 ElementIndex, |
Returns full material property path and UObject owner property object Path examples: Material property path with array element and inner struct Materials[0].InnerStruct.Material Material property path with array element Materials[0] Simple material property path Materials | |
| void | Called when AttachParent changes, to allow the scene to update its attachment state. | ||
| void | OnChildAttached
(
USceneComponent* ChildComponent |
Called after a child scene component is attached to this component. | |
| void | OnChildDetached
(
USceneComponent* ChildComponent |
Called after a child scene component is detached from this component. |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | Activate
(
bool bReset |
Activates the SceneComponent, should be overridden by native child classes. | |
| UObject const * | Give a readable name for this component, including asset name if applicable | ||
| void | ApplyWorldOffset
(
const FVector& InOffset, |
Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location | |
| void | Function that gets called from within Map_Check to allow this actor component to check itself for any potential errors and register them with map check dialog. | ||
| void | CreateRenderState_Concurrent
(
FRegisterComponentContext* Context |
Used to create any rendering thread information for this component | |
| void | Deactivate () |
Deactivates the SceneComponent. | |
| void | Used to shut down any rendering thread structure for this component | ||
| bool | Returns whether this component has tick enabled or not | ||
| bool | Overridable check for a component to indicate to its Owner that it should prevent the Actor from auto destroying when finished | ||
| void | Allows components to handle an EOF update happening mid tick. | ||
| void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | |
| void | OnUnregister () |
Called when a component is unregistered. | |
| void | Called to send dynamic data for this component to the rendering thread | ||
| void | Called to send a transform update for this component to the rendering thread | ||
| void | SetComponentTickEnabled
(
bool bEnabled |
Set this component's tick functions to be enabled or disabled. | |
| bool | Return true if this component is in a state where it can be activated normally. | ||
| void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| void | Called to finish destroying the object. | ||
| FString | This function actually does the work for the GetDetailedInfo() and is virtual. | ||
| void | GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). | |
| void | PostEditChangeChainProperty
(
FPropertyChangedChainEvent& PropertyChangedEvent |
This alternate version of PostEditChange is called when properties inside structs are modified. | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | PreEditChange
(
FProperty* PropertyThatWillChange |
This is called when a property is about to be modified externally | |
| void | Handles reading, writing, and reference collecting using FArchive. |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EForceAsyncWorkCompletion |
Typedefs
| Name | Description |
|---|---|
| TrailEmitterArray | Array of trail emitters. |
Constants
| Name | Description |
|---|---|
| OnSystemPreActivationChange | Static delegate called for all systems on an activation change. |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TEnumAsByte< EAttachLocation::Type > | AutoAttachLocationType_DEPRECATED | DEPRECATED: Options for how we handle our location when we attach to the AutoAttachParent, if bAutoManageAttachment is true. |