UKismetRenderingLibrary::SetCastInsetShadowForAllAttachments
#include "Kismet/KismetRenderingLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Sets the inset shadow casting state on a component and recursively on all of its child attachments, optionally grouping them to share a single depth target.
Caveats & Gotchas
- • Applies recursively to the entire attachment hierarchy under PrimitiveComponent — there is no way to set inset shadow state for a single component without affecting its children via this function.
- • Enabling bLightAttachmentsAsGroup changes rendering cost characteristics: one shared depth target is cheaper than one per attachment but can reduce shadow quality/precision for the group.
- • Commonly used for character equipment (e.g. weapons attached to a skeletal mesh) so held items receive the same self-shadowing treatment as the character.
Signature
static void SetCastInsetShadowForAllAttachments(UPrimitiveComponent* PrimitiveComponent, bool bCastInsetShadow, bool bLightAttachmentsAsGroup) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| PrimitiveComponent | UPrimitiveComponent* | The root component whose attachment hierarchy will be updated. | — |
| bCastInsetShadow | bool | Whether the component and its children should cast an inset (self-contained) shadow. | — |
| bLightAttachmentsAsGroup | bool | If true, all attachments share a single depth target for inset shadow rendering instead of each getting its own. | — |
Return Type
void Example
Enable grouped inset shadows on a character C++
UKismetRenderingLibrary::SetCastInsetShadowForAllAttachments(CharacterMesh, true, true); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?