UKismetStringLibrary::Conv_BoxCenterAndExtentsToString
#include "Kismet/KismetStringLibrary.h"
Access: public
Specifiers: staticBlueprintPureBlueprintAutocast
Description
Converts an FBox to a string showing its computed Center and Extent values rather than raw Min/Max corners. Backs the 'To String Center and Extents (Box)' Blueprint conversion node.
Caveats & Gotchas
- • Distinct node from Conv_BoxToString: this one derives and prints Center/Extent, which is more useful for describing a volume's size and position but does not preserve the original Min/Max corner values exactly if the box is degenerate.
- • For an invalid/zero-initialized FBox, Center will read as (0,0,0) and Extent as (0,0,0), which is indistinguishable from a genuinely zero-sized box at the origin — check Box.IsValid() before trusting the string.
Signature
static FString Conv_BoxCenterAndExtentsToString(const FBox& Box) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Box | const FBox& | The bounding box value to convert. | — |
Return Type
FString Example
Log a bounding box as center/extent C++
FBox Bounds = MeshComponent->Bounds.GetBox();
FString BoundsText = UKismetStringLibrary::Conv_BoxCenterAndExtentsToString(Bounds);
UE_LOG(LogTemp, Log, TEXT("%s"), *BoundsText); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?