Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

UE3:DecalManager (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> Actor >> DecalManager
Package: 
Engine
Direct subclass:
UTDecalManager
This class in other games:
UDK

Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.

Properties

ActiveDecals

Type: array<ActiveDecalInfo>


DecalLifeSpan

Type: float

Modifiers: globalconfig

default lifetime for decals

Default value: 30.0

DecalTemplate

Type: DecalComponent

Modifiers: protected

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

Default value: DecalComponent'BaseDecal'

MaxActiveDecals

Type: int

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

PoolDecals

Type: array<DecalComponent>

components currently in the pool

Default values

Property Value
CollisionType COLLIDE_CustomDefault

Subobjects

BaseDecal

Class: Engine.DecalComponent

No new values.

Structs

ActiveDecalInfo

Modifiers: native

components currently active in the world and how much longer they will be

DecalComponent Decal 
float LifetimeRemaining 

Functions

Static native functions

AreDynamicDecalsEnabled

native static final function bool AreDynamicDecalsEnabled ()

Returns:

whether dynamic decals are enabled

Events

DecalFinished

event DecalFinished (DecalComponent Decal)

called when the given decal's lifetime has run out

Note: caller responsible for removing from ActiveDecals array (this is to prevent code iterating the array from having dependencies on this function)

Other instance functions

CanSpawnDecals

function bool CanSpawnDecals ()

Returns:

whether spawning decals is allowed right now

SpawnDecal

function DecalComponent SpawnDecal (MaterialInterface DecalMaterial, Object.Vector DecalLocation, Object.Rotator DecalOrientation, float Width, float Height, float Thickness, bool bNoClip, optional float DecalRotation, optional PrimitiveComponent HitComponent, optional bool bProjectOnTerrain, optional bool bProjectOnSkeletalMeshes, optional name HitBone, optional int HitNodeIndex, optional int HitLevelIndex)

spawns a decal with the given parameters, taking a component from the pool or creating as necessary

Parameters:

  • DecalMaterial - the material to use for the decal
  • Width - decal width
  • Height - decal height
  • Thickness - decal thickness
  • bNoClip - if true, use the bNoClip code path for decal generation (requires DecalMaterial to have clamped texture coordinates)
  • DecalRotation - opt) rotation of the decal in degrees
  • HitComponent - opt) if specified, will only project on this component (optimization)
  • bProjectOnTerrain - opt) whether decal can project on skeletal meshes (default false)
  • HitBone - opt) if HitComponent is a skeletal mesh, the bone that was hit
  • HitNodeIndex - opt) if HitComponent is BSP, the node that was hit
  • HitLevelIndex - opt) if HitComponent is BSP, the index of the level whose BSP was hit

Returns:

the DecalComponent that will be used (may be None if dynamic decals are disabled)

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 lifetime runs out