UE3:EmitterPool (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
(Redirected from UE3:EmitterBaseInfo (UT3))
Jump to navigation Jump to search
UT3 Object >> Actor >> EmitterPool
Package: 
Engine

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-2007 Epic Games, Inc. All Rights Reserved.

Properties

ActiveComponents

Type: array<ParticleSystemComponent>

components currently active

bLogPoolOverflow

Type: bool

Modifiers: globalconfig

option to log out the names of all active effects when the pool overflows

bLogPoolOverflowList

Type: bool

Modifiers: globalconfig


FreeMatInstConsts

Type: array<MaterialInstanceConstant>

Modifiers: private, const

The free MaterialInstanceConstants used by emitters in this pool

FreeSMComponents

Type: array<StaticMeshComponent>

Modifiers: private, const

The free StaticMeshComponents used by emitters in this pool

IdealMaterialInstanceConstants

Type: int


Default value: 250

IdealStaticMeshComponents

Type: int

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.

Default value: 250

MaxActiveEffects

Type: int

maximum allowed active components - if this is greater than 0 and is exceeded, the oldest active effect is taken

PoolComponents

Type: array<ParticleSystemComponent>

Modifiers: const

components currently in the pool

PSCTemplate

Type: ParticleSystemComponent

Modifiers: protected

template to base pool components off of - should not be used for effects or attached to anything

Default value: ParticleSystemComponent'ParticleSystemComponent0'

RelativePSCs

Type: array<EmitterBaseInfo>


SMC_MIC_CurrentReductionTime

Type: float

Modifiers: transient


SMC_MIC_ReductionTime

Type: float

The amount of time to allow the SMC and MIC arrays to be beyond their ideals.

Default value: 2.5

Default values

Property Value
CollisionType COLLIDE_CustomDefault
TickGroup TG_DuringAsyncWork

Subobjects

ParticleSystemComponent0

Class: Engine.ParticleSystemComponent

Property Value
AbsoluteRotation True
AbsoluteTranslation True

Structs

EmitterBaseInfo

Modifiers: native

list of components that should be relative to an Actor

ParticleSystemComponent PSC 
Actor Base 
Object.Vector RelativeLocation 
Object.Rotator RelativeRotation 

Functions

Native functions

FreeMaterialInstanceConstants

protected native final function FreeMaterialInstanceConstants (StaticMeshComponent SMC)

internal - moves the MIConstants from given SMComponent to the pool free list

FreeStaticMeshComponents

protected native final function FreeStaticMeshComponents (ParticleSystemComponent PSC)

internal - moves the SMComponents from given PSC to the pool free list

GetFreeMatInstConsts

protected native final function MaterialInstanceConstant GetFreeMatInstConsts (bool bCreateNewObject)

internal - retrieves a MaterialInstanceConstant from the pool free list

Parameters:

  • bCreateNewObject - If TRUE, create an MIC w/ the pool as its outer

Returns:

MaterialInstanceConstant The MIC, NULL if none was available/created

GetFreeStaticMeshComponent

protected native final function StaticMeshComponent GetFreeStaticMeshComponent (bool bCreateNewObject)

internal - retrieves a SMComponent from the pool free list

Parameters:

  • bCreateNewObject - If TRUE, create an SMC w/ the pool as its outer

Returns:

StaticMeshComponent The SMC, NULL if none was available/created

GetPooledComponent

protected native final function ParticleSystemComponent GetPooledComponent (ParticleSystem EmitterTemplate)

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

Returns:

the ParticleSystemComponent to use

ReturnToPool

protected native final function ReturnToPool (ParticleSystemComponent PSC)

internal - detaches the given PSC and returns it to the pool

Other instance functions

OnParticleSystemFinished

function OnParticleSystemFinished (ParticleSystemComponent PSC)

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

SpawnEmitter

function ParticleSystemComponent SpawnEmitter (ParticleSystem EmitterTemplate, Object.Vector SpawnLocation, optional Object.Rotator SpawnRotation, optional Actor AttachToActor)

plays the specified effect at the given location and rotation, taking a component from the pool or creating as necessary

Parameters:

  • EmitterTemplate - particle system to create
  • SpawnLocation - location to place the effect in world space
  • SpawnRotation - opt) - rotation to place the effect in world space
  • AttachToActor - opt) - if specified, component will move along with this Actor

Returns:

the ParticleSystemComponent the effect will use

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

SpawnEmitterCustomLifetime

function ParticleSystemComponent SpawnEmitterCustomLifetime (ParticleSystem EmitterTemplate)

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

Parameters:

  • EmitterTemplate - particle system to create

Returns:

the ParticleSystemComponent to use