AActor::MarkNeedsRecomputeBoundsOnceForGame
#include "GameFramework/Actor.h"
Access: public
Description
Marks all SceneComponents on this actor that have bComputeBoundsOnceForGame set as needing their cached bounds recomputed the next time UpdateBounds is called. Necessary after a level transform is applied that invalidates cook-time cached bounds.
Caveats & Gotchas
- • Only affects SceneComponents that have the bComputeBoundsOnceForGame flag enabled — components without this flag always recompute bounds normally and are unaffected.
- • The recompute is deferred to the next UpdateBounds call, not immediate — bounds will still be stale until that pass completes.
- • This is typically called automatically by the engine when applying world offsets; manually calling it is only needed in custom level streaming or procedural transform workflows.
Signature
ENGINE_API void MarkNeedsRecomputeBoundsOnceForGame() Return Type
void Example
Invalidate cached bounds after a procedural level shift C++
void AMyLevelManager::ApplyLevelOffset(const FVector& Offset)
{
for (AActor* Actor : LevelActors)
{
Actor->SetActorLocation(Actor->GetActorLocation() + Offset);
Actor->MarkNeedsRecomputeBoundsOnceForGame();
}
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?