UActorComponent::InvalidateLightingCacheDetailed
#include "Components/ActorComponent.h"
Access: public
Specifiers: virtual
Description
Override point for subclasses to discard statically cached lighting information when the component has moved or changed. The base UActorComponent implementation is empty.
Caveats & Gotchas
- • The base implementation does nothing — only subclasses with actual lightmap data (e.g. UPrimitiveComponent) provide a meaningful implementation.
- • When bTranslationOnly is true, subclasses may opt to only rebuild shadow maps, skipping the more expensive indirect lighting rebuild.
- • Prefer calling the convenience wrapper InvalidateLightingCache() unless you need fine-grained control over the two flags.
Signature
virtual void InvalidateLightingCacheDetailed(bool bInvalidateBuildEnqueuedLighting, bool bTranslationOnly) {} Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bInvalidateBuildEnqueuedLighting | bool | Whether to also invalidate lighting that has already been queued for building. | — |
| bTranslationOnly | bool | If true, only translation changed — allows a cheaper partial cache invalidation. | — |
Return Type
void Example
Override in a custom primitive component C++
void UMyPrimitiveComponent::InvalidateLightingCacheDetailed(bool bInvalidateBuildEnqueuedLighting, bool bTranslationOnly)
{
Super::InvalidateLightingCacheDetailed(bInvalidateBuildEnqueuedLighting, bTranslationOnly);
// Clear our own cached shadow volume data
CachedShadowVolume.Reset();
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?