Navigation
API > API/Plugins > API/Plugins/ScriptableToolsEditorMode > API/Plugins/ScriptableToolsEditorMode/FScriptableToolsEditorModeStyle
Description
Try to find a png or svg icon at FileNameWithPath and register it in the style set with the given StyleIconIdentifier, ie so that later it can be found FSlateIcon(FScriptableToolsEditorModeStyle::Get()->GetStyleSetName(), StyleIconIdentifier). This is intended to be used for (eg) custom icons defined in Scriptable Tool Blueprints, that are not known at compile time.
Will print error and return false if image is not found, or not png/svg format.
FileNameWithPath must be the full on-disk path to the icon, which is constructed in code from a relative path the user enters as (eg) a property/etc. To help with debugging, this path can be provided as ExternalRelativePath, and it will be printed out instead of the absolute path as part of the log error message.
| Name | TryRegisterCustomIcon |
| Type | function |
| Header File | /Engine/Plugins/Editor/ScriptableToolsEditorMode/Source/ScriptableToolsEditorMode/Public/ScriptableToolsEditorModeStyle.h |
| Include Path | #include "ScriptableToolsEditorModeStyle.h" |
| Source | /Engine/Plugins/Editor/ScriptableToolsEditorMode/Source/ScriptableToolsEditorMode/Private/ScriptableToolsEditorModeStyle.cpp |
static bool TryRegisterCustomIcon
(
FName StyleIconIdentifier,
FString FileNameWithPath,
FString ExternalRelativePath
)