Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Components
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UDecalComponent
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Components/DecalComponent.h |
| Include | #include "Components/DecalComponent.h" |
Syntax
class UDecalComponent : public USceneComponent
Remarks
A material that is rendered onto the surface of a mesh. A kind of 'bumper sticker' for a model.
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint8: 1 | bDestroyOwnerAfterFade | Automatically destroys the owning actor after fully fading out. | |
| FLinearColor | DecalColor | Decal color, can be accessed using the material Decal Color node. | |
| TObjectPtr< class UMaterialInterface > | DecalMaterial | Decal material. | |
| FVector | DecalSize | Decal size in local space (does not include the component scale), technically redundant but there for convenience | |
| float | FadeDuration | Time in seconds for the decal to fade out. | |
| float | FadeInDuration | ||
| float | FadeInStartDelay | ||
| float | FadeScreenSize | ||
| float | FadeStartDelay | Time in seconds to wait before beginning to fade out the decal. | |
| FDeferredDecalProxy * | SceneProxy | The decal proxy. | |
| int32 | SortOrder | Controls the order in which decal elements are rendered. | |
| FTimerHandle | TimerHandle_DestroyDecalComponent | Handle for efficient management of DestroyDecalComponent timer |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UDecalComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UMaterialInstanceDynamic * | Utility to allocate a new Dynamic Material Instance, set its parent to the currently applied material, and assign it | ||
| FDeferredDecalProxy * | |||
| UMaterialInterface * | Accessor for decal material | ||
| float | |||
| float | |||
| float | |||
| float | |||
| UMaterialInterface * | GetMaterial
(
int32 ElementIndex |
||
| int32 | |||
| FTransform | |||
| void | GetUsedMaterials
(
TArray< UMaterialInterface* >& OutMaterials, |
Retrieves the materials used in this component | |
| void | Called when the life span of the decal has been exceeded | ||
| void | Pushes new selection state to the render thread primitive proxy | ||
| void | SetDecalColor
(
const FLinearColor& Color |
Sets the decal color. | |
| void | SetDecalMaterial
(
UMaterialInterface* NewDecalMaterial |
Setting decal material on decal component. This will force the decal to reattach | |
| void | SetFadeIn
(
float StartDelay, |
||
| void | SetFadeOut
(
float StartDelay, |
Sets the decal's fade start time, duration and if the owning actor should be destroyed after the decal is fully faded out. | |
| void | SetFadeScreenSize
(
float NewFadeScreenSize |
Set the FadeScreenSize for this decal component | |
| void | SetLifeSpan
(
const float LifeSpan |
||
| void | SetMaterial
(
int32 ElementIndex, |
||
| void | SetSortOrder
(
int32 Value |
Sets the sort order for the decal component. |
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 |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| const UObject * | Give a readable name for this component, including asset name if applicable | ||
| void | BeginPlay () |
Begins Play for the component. | |
| void | CreateRenderState_Concurrent
(
FRegisterComponentContext* Context |
Used to create any rendering thread information for this component | |
| void | Used to shut down any rendering thread structure for this component | ||
| void | Called to send a transform update for this component to the rendering thread |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| bool | Called during async load to determine if PostLoad can be called on the loading thread. | ||
| void | Handles reading, writing, and reference collecting using FArchive. |
See Also
https://docs.unrealengine.com/latest/INT/Engine/Actors/DecalActor
UDecalActor