Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/UWidgetBlueprintLibrary
Description
Find all widgets in the world with the specified interface. This is a slow operation, use with caution e.g. do not use every frame.
| Name | GetAllWidgetsWithInterface |
| Type | function |
| Header File | /Engine/Source/Runtime/UMG/Public/Blueprint/WidgetBlueprintLibrary.h |
| Include Path | #include "Blueprint/WidgetBlueprintLibrary.h" |
| Source | /Engine/Source/Runtime/UMG/Private/WidgetBlueprintLibrary.cpp |
UFUNCTION (BlueprintCallable, BlueprintCosmetic, Category="Widget",
Meta=(WorldContext="WorldContextObject", DeterminesOutputType="WidgetClass", DynamicOutputParam="FoundWidgets"))
static void GetAllWidgetsWithInterface
(
const UObject * WorldContextObject,
TArray < UUserWidget * > & FoundWidgets,
TSubclassOf < UInterface > Interface,
bool TopLevelOnly
)
Parameters
| Name | Remarks |
|---|---|
| Interface | The interface to find. Must be specified or result array will be empty. |
| FoundWidgets | Output array of widgets that implement the specified interface. |
| TopLevelOnly | Only the widgets that are direct children of the viewport will be returned. |