Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
this class manages a pool of ParticleSystemComponents it is meant to be used for single shot effects spawned during gameplay to reduce object overhead that would otherwise be caused by spawning dozens of Emitters Copyright 1998-2011 Epic Games, Inc. All Rights Reserved.
Core.Object | +-- Engine.Actor | +-- Engine.EmitterPool
UDKEmitterPool
Constants Summary |
---|
Inherited Contants from Core.Object |
---|
AspectRatio16x9, AspectRatio4x3, AspectRatio5x4, DegToRad, DegToUnrRot, INDEX_NONE, InvAspectRatio16x9, InvAspectRatio4x3, InvAspectRatio5x4, MaxInt, Pi, RadToDeg, RadToUnrRot, UnrRotToDeg, UnrRotToRad |
Inherited Variables from Core.Object |
---|
Class, HashNext, HashOuterNext, Linker, LinkerIndex, Name, NetIndex, ObjectArchetype, ObjectFlags, ObjectInternalInteger, Outer, StateFrame, VfTableObject |
Enumerations Summary |
---|
Inherited Enumerations from Engine.Actor |
---|
ECollisionType, EDoubleClickDir, EMoveDir, ENetRole, EPhysics, ETravelType |
Inherited Enumerations from Core.Object |
---|
AlphaBlendType, EAspectRatioAxisConstraint, EAutomatedRunResult, EAxis, EDebugBreakType, EInputEvent, EInterpCurveMode, EInterpMethodType, ETickingGroup |
Structures Summary | ||
---|---|---|
EmitterBaseInfo PSC, Base, RelativeLocation, RelativeRotation, bInheritBaseScale |
Inherited Structures from Engine.Actor |
---|
ActorReference, AnimSlotDesc, AnimSlotInfo, BasedPosition, CollisionImpactData, ImpactInfo, NavReference, PhysEffectInfo, RigidBodyContactInfo, RigidBodyState, TimerData, TraceHitInfo |
Variables Detail |
---|
components currently active
option to log out the names of all active effects when the pool overflows
The free MaterialInstanceConstants used by emitters in this pool
The free StaticMeshComponents used by emitters in this pool
The ideal number of StaticMeshComponents and MaterialInstanceConstants. If their counts are greater than this for more than ReductionTime, then they will be chopped down to their respective settings.
maximum allowed active components - if this is greater than 0 and is exceeded, the oldest active effect is taken
components currently in the pool
template to base pool components off of - should not be used for effects or attached to anything
The amount of time to allow the SMC and MIC arrays to be beyond their ideals.
Structures Detail |
---|
var Actor Base;};
var bool bInheritBaseScale;
var ParticleSystemComponent PSC;
var vector RelativeLocation;
var rotator RelativeRotation;
list of components that should be relative to an Actor
Functions Detail |
---|
Cleans up the pool components, removing any unused
@param bClearActive If TRUE, clear active as well as inactive pool components
internal - moves the MIConstants from given SMComponent to the pool free list
internal - moves the SMComponents from given PSC to the pool free list
internal - retrieves a MaterialInstanceConstant from the pool free list
@param bCreateNewObject If TRUE, create an MIC w/ the pool as its outer
@return MaterialInstanceConstant The MIC, NULL if none was available/created
internal - retrieves a SMComponent from the pool free list
@param bCreateNewObject If TRUE, create an SMC w/ the pool as its outer
@return StaticMeshComponent The SMC, NULL if none was available/created
internal - helper for spawning functions gets a component from the appropriate pool array (checks PerEmitterPools) includes creating a new one if necessary as well as taking one from the active list if the max number active has been exceeded
@return the ParticleSystemComponent to use
set to each pool component's finished delegate to return it to the pool for custom lifetime PSCs, must be called manually when done with the component
internal - detaches the given PSC and returns it to the pool
plays the specified effect at the given location and rotation, taking a component from the pool or creating as necessary
@note: the component is returned so the caller can perform any additional modifications (parameters, etc), but it shouldn't keep the reference around as the component will be returned to the pool as soon as the effect is complete
@param EmitterTemplate - particle system to create
@param SpawnLocation - location to place the effect in world space
@param SpawnRotation (opt) - rotation to place the effect in world space
@param AttachToActor (opt) - if specified, component will move along with this Actor
@param bInheritScaleFromBase (opt) - if TRUE scale from the base actor will be applied
@return the ParticleSystemComponent the effect will use
spawns a pooled component that has a custom lifetime (controlled by the caller) the caller is responsible for attaching/detaching the component as well as calling our OnParticleSystemFinished() function when it is done with the component the pool may take the component back early - if it does, it will trigger the component's OnSystemFinished delegate so the caller can guarantee that it will be triggered
@param EmitterTemplate - particle system to create
@param bSkipAutoActivate - if TRUE, do not autoactivate the component when retrieving it from the pool
@return the ParticleSystemComponent to use
spawns a particle system attached to a SkeletalMeshComponent instead of to another Actor or to nothing as with SpawnEmitter(), the caller should avoid persistent references to the returned component as it will get automatically reclaimed when the effect is complete
@note: if the owning Actor is destroyed before the effect completes, the ParticleSystemComponent will end up being marked pending kill and therefore eventually destroyed as well. The pool handles this gracefully, although it's obviously suboptimal.
@param EmitterTemplate - particle system to create
@param Mesh - mesh component to attach to
@param AttachPointName - bone or socket to attach to
@param bAttachToSocket (opt) - whether AttachPointName is a socket or bone name
@param RelativeLoc (opt) - offset from bone location to place the effect (not used when attaching to socket)
@param RelativeRot (opt) - offset from bone rotation to place the effect (not used when attaching to socket)
@return the ParticleSystemComponent the effect will use
Defaultproperties |
---|
defaultproperties { Begin Object Class=ParticleSystemComponent Name=ParticleSystemComponent0 AbsoluteTranslation=true AbsoluteRotation=true SecondsBeforeInactive=0.0 End Object PSCTemplate=ParticleSystemComponent0 TickGroup=TG_DuringAsyncWork SMC_MIC_ReductionTime=2.5 IdealStaticMeshComponents=250 IdealMaterialInstanceConstants=250 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |