Navigation
API > API/Plugins > API/Plugins/SlateInspectorToolset > API/Plugins/SlateInspectorToolset/FSlateInspectorToolsetRefCache
Description
Returns existing ref or assigns a new one using the role prefix.
The role prefix determines the ref format: "b" for buttons produces b1, b2, b3, etc. Within a single snapshot pass, the same widget always gets the same ref (deduplication via WidgetToRef lookup).
| Name | GetOrAssignRef |
| Type | function |
| Header File | /Engine/Plugins/Experimental/Toolsets/SlateInspectorToolset/Source/SlateInspectorToolset/Public/SlateInspectorToolsetRefCache.h |
| Include Path | #include "SlateInspectorToolsetRefCache.h" |
| Source | /Engine/Plugins/Experimental/Toolsets/SlateInspectorToolset/Source/SlateInspectorToolset/Private/SlateInspectorToolsetRefCache.cpp |
FString GetOrAssignRef
(
TSharedRef < SWidget > Widget,
const FString & RolePrefix
)
The assigned ref string (e.g., "b3").
Parameters
| Name | Remarks |
|---|---|
| Widget | The widget to assign a ref to. |
| RolePrefix | Short prefix derived from the widget's role (e.g., "b", "tb", "cb"). |