FGeometry::Size
Deprecated: Use GetLocalSize() instead.
#include "Layout/Geometry.h"
Access: public
Specifiers: const
Description
Size of the geometry in local space. Use GetLocalSize() in new code — this public field exists for backward compatibility only.
Caveats & Gotchas
- • Deprecated — the field type FDeprecateSlateVector2D will issue deprecation warnings on direct access in future engine versions. Use the GetLocalSize() accessor instead.
- • This is local-space size, not absolute-space size. At DPI scales other than 1.0 the screen-pixel footprint can be much larger; use GetAbsoluteSize() when you need pixel dimensions.
Signature
const FDeprecateSlateVector2D Size Example
Correct modern usage C++
// Use GetLocalSize(), not .Size directly.
FVector2f LocalSz = FVector2f(MyGeometry.GetLocalSize());
UE_LOG(LogTemp, Log, TEXT("Local size: %s"), *LocalSz.ToString()); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?