UWidgetComponent. UIsdkWidgetRegionProvider binds to a single widget component, walks the UMG tree of its hosted UUserWidget, and exposes each clickable element as a region keyed by a stable int64 id. Ids come from UWidget::GetUniqueID() widened to int64, so they are always non-negative and stable for the lifetime of the underlying UWidget.
GetRegionIds.static constexpr int64 SelfRegionId = INDEX_NONE;
SelfRegionId represents the whole-panel region when the widget has no clickable sub-widgets. It is negative, so it cannot collide with a real id.RegionRefreshIntervalSeconds on UIsdkGazeTargetingComponent (default 0.2 seconds). It consults the provider only in ConeCast mode; in Line mode the targeting component emits a whole-panel candidate and lets UMG resolve the sub-widget downstream.
| Function | Exposure | Description |
|---|---|---|
SetWidgetComponent(UWidgetComponent* InWidget) | BlueprintCallable | Binds the provider to a widget component. Passing nullptr clears the binding. The next RefreshRegions call performs a fresh rebuild. |
RefreshRegions(float MinRebuildIntervalSeconds = 0.f) | BlueprintCallable | Recomputes the region map. A structural change (a clickable widget added, removed, enabled, or hidden) rebuilds immediately. A layout-only change (scroll, relayout, animated Render Transform) rebuilds at most once per MinRebuildIntervalSeconds. A non-positive interval rebuilds on every change. Returns true only when a rebuild occurred on this call. |
GetRebuildCount() const | BlueprintPure | Returns the monotonic count of rebuilds since construction. Advances by one per genuine rebuild. Useful for churn detection and tests. |

RegionRefreshIntervalSeconds straight through to RefreshRegions, so a custom driver that wants gaze-equivalent throttling passes 0.2f.| Function | Exposure | Description |
|---|---|---|
GetRegionIds(TArray<int64>& OutRegionIds) const | BlueprintCallable | Fills OutRegionIds with one id per cached clickable region. Emits a single SelfRegionId when the panel has no clickable sub-widgets. Regions clipped entirely out of view are omitted. |
IsInside(const FVector& WorldPoint, int64 RegionId) const | BlueprintPure | Projects WorldPoint into panel pixel space and returns true when the point lies inside the region rect. SelfRegionId always returns true. Meaningful only for points on the panel plane. |
FindNearestBoundaryPoint(const FVector& WorldPoint, int64 RegionId, FVector& OutWorldBoundaryPoint, bool& bOutInside) const | BlueprintCallable | Projects WorldPoint into panel pixel space and returns the nearest boundary point on the region rect: an outside point clamps onto the rect, an inside point snaps to the nearest edge. bOutInside reports which branch fired. Returns false for SelfRegionId or an unknown region. |
TiebreakRegions(int64 RegionIdA, int64 RegionIdB) const | BlueprintPure | Returns -1 to favor A, 1 to favor B, 0 for a tie. Smaller pixel area wins, so the more specific nested element is preferred. An id that is not in the current region cache loses to any id that is. |
GetRegionRectGeometry(int64 RegionId, FTransform& OutWorldPose, FVector2D& OutWorldSize) const | BlueprintCallable | Returns the world-space center pose and (width, height) of a region rect. The pose shares the component’s rotation, so local X is the panel normal. SelfRegionId resolves to the whole render-target rect. |
GetRegionWidget(int64 RegionId) const | BlueprintPure | Returns the UWidget backing a region, or nullptr for SelfRegionId, an unknown region, or a widget that has been destroyed. |


// Bind once, or whenever the panel changes.
Provider->SetWidgetComponent(WidgetComponent);
// Refresh the cache before any query. The interval throttles layout-only rebuilds.
Provider->RefreshRegions(0.2f);
TArray<int64> RegionIds;
Provider->GetRegionIds(RegionIds);
for (const int64 RegionId : RegionIds)
{
FVector HitPoint = WorldHit;
if (RegionId != UIsdkWidgetRegionProvider::SelfRegionId &&
!Provider->IsInside(WorldHit, RegionId))
{
bool bInside = false;
FVector ClampedPoint;
if (!Provider->FindNearestBoundaryPoint(WorldHit, RegionId, ClampedPoint, bInside))
{
continue;
}
HitPoint = ClampedPoint;
}
// Score HitPoint against your own cone or ray test, then use TiebreakRegions
// to break ties between nested regions when two survive.
}

UIsdkWidgetRegionDebugComponent is a BlueprintSpawnableComponent that draws a wireframe box per region. Visualization is compiled out of Shipping builds through #if !UE_BUILD_SHIPPING, so it costs nothing at release.
| Property | Type | Default | Description |
|---|---|---|---|
bAutoWireWidget | bool | true | Binds to the owning actor’s first UWidgetComponent at BeginPlay when WidgetComponent is unset. |
WidgetComponent | TObjectPtr<UWidgetComponent> | none | The widget component to visualize. Overrides auto-wire when set in the editor. |