UWidget::GetTickSpaceGeometry
#include "Components/Widget.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Returns the geometry used during the last Tick. For most practical purposes this is identical to GetCachedGeometry; the distinction is only meaningful in rare cases where a widget's tick geometry differs from its paint geometry.
Caveats & Gotchas
- • Like GetCachedGeometry, this value is one frame behind and will be a default zero-size geometry before the widget has been ticked at least once.
- • In the vast majority of UMG widgets, GetTickSpaceGeometry and GetCachedGeometry return the same value. Use GetCachedGeometry unless you have a specific reason to distinguish tick-space from paint-space.
- • The returned reference is to internal storage; copy the value if you need to use it after other widget operations that might trigger a layout update.
Signature
UMG_API const FGeometry& GetTickSpaceGeometry() const Return Type
const FGeometry& Example
Get local size during tick C++
// Inside a widget's NativeTick override:
FGeometry TickGeo = GetTickSpaceGeometry();
FVector2D LocalSize = TickGeo.GetLocalSize(); Tags
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?