Module |
|
Header |
/Engine/Source/Runtime/UMG/Public/Blueprint/UserWidgetPool.h |
Include |
#include "Blueprint/UserWidgetPool.h" |
struct FUserWidgetPool
Pools UUserWidget instances to minimize UObject and SWidget allocations for UMG elements with dynamic entries.
Note that if underlying Slate instances are released when a UserWidget instance becomes inactive, NativeConstruct & NativeDestruct will be called when UUserWidget instances are made active or inactive, respectively, provided the widget isn't actively referenced in the Slate hierarchy (i.e. if the shared reference count on the widget goes from/to 0).
WARNING: Be sure to release the pool's Slate widgets within the owning widget's ReleaseSlateResources call to prevent leaking due to circular references Otherwise the cached references to SObjectWidgets will keep the UUserWidgets - and all that they reference - alive
Name | Description | |
---|---|---|
|
FUserWidgetPool() |
|
|
FUserWidgetPool ( |
Name | Description | |
---|---|---|
|
~FUserWidgetPool() |
Name | Description | ||
---|---|---|---|
|
AddReferencedObjects ( |
Report any references to UObjects to the reference collector (only necessary if this is not already a UPROPERTY) |
|
|
const TArray... |
GetActiveWidgets() |
|
|
UserWidgetT ... |
GetOrCreateInstance ( |
Gets an instance of the widget this factory is for with a custom underlying SObjectWidget type |
|
UserWidgetT ... |
GetOrCreateInstance ( |
Gets an instance of a widget of the given class. |
|
IsInitialized() |
||
|
RebuildWidgets() |
Triggers RebuildWidget on all currently active UserWidget instances |
|
|
Release ( |
Return a widget object to the pool, allowing it to be reused in the future |
|
|
Release ( |
Return a widget object to the pool, allowing it to be reused in the future |
|
|
ReleaseAll ( |
Returns all active widget objects to the inactive pool and optionally destroys all cached underlying slate widgets. |
|
|
ReleaseAllSlateResources() |
Reset of all cached underlying Slate widgets, but not the active UUserWidget objects |
|
|
ReleaseInactiveSlateResources() |
Reset of all cached underlying Slate widgets, only for inactive widgets in the pool. |
|
|
ResetPool() |
Full reset of all created widget objects (and any cached underlying slate) |
|
|
SetWorld ( |
In the case that you don't have an owner widget, you should set a world to your pool, or it won't be able to construct widgets. |
Name |
Description |
---|---|
WidgetConstructFunc |
Name | Description | ||
---|---|---|---|
|
ReleaseSlateResources() |
Use ReleaseAllSlateResources instead. |