ActiveIconName
ActiveIconName
#Overview
name: ActiveIconName
The value of this variable can be defined or overridden in .ini config files. 5
.ini config files referencing this setting variable.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ActiveIconName is to represent the name of the active icon used in the Unreal Engine editor’s user interface, specifically for preview mode functionality.
This setting variable is primarily used in the Level Editor module and the Core module of Unreal Engine. It’s part of the preview platform system, which allows developers to switch between different platform configurations for testing and development purposes.
The value of this variable is set in the DataDrivenPlatformInfoRegistry, specifically in the ParsePreviewPlatforms function. It’s parsed from a configuration file or data source that defines preview platform settings.
ActiveIconName interacts closely with other variables in the preview platform system, such as InactiveIconName, ActiveIconPath, and InactiveIconPath. These variables work together to provide visual feedback in the editor UI about the current preview mode state.
Developers should be aware that this variable is part of a larger system for managing preview platforms. It’s not intended to be modified directly in most cases, but rather set through the appropriate configuration files or editor settings.
Best practices when using this variable include:
- Ensuring that the icon names referenced actually exist in the engine’s style set.
- Maintaining consistency between the active and inactive icon names for each preview platform.
- Using descriptive and unique names for each platform to avoid conflicts.
- Considering the visual design of icons to clearly indicate the active/inactive state to users.
Developers working on custom editor tools or extending the preview platform system should pay attention to how these icon names are used in the UI construction, especially in the LevelEditorToolBar and StarshipCoreStyle classes.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:28, section: [PreviewPlatform AndroidES31]
- INI Section:
PreviewPlatform AndroidES31
- Raw value:
LevelEditor.PreviewMode.AndroidES31.Enabled
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:39, section: [PreviewPlatform AndroidVulkan]
- INI Section:
PreviewPlatform AndroidVulkan
- Raw value:
LevelEditor.PreviewMode.AndroidVulkan.Enabled
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:50, section: [PreviewPlatform AndroidVulkanSM5]
- INI Section:
PreviewPlatform AndroidVulkanSM5
- Raw value:
LevelEditor.PreviewMode.AndroidVulkanSM5.Enabled
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/DataDrivenPlatformInfo.ini:31, section: [PreviewPlatform IOSMetal]
- INI Section:
PreviewPlatform IOSMetal
- Raw value:
LevelEditor.PreviewMode.iOS.Enabled
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/DataDrivenPlatformInfo.ini:43, section: [PreviewPlatform IOSMetalSM5]
- INI Section:
PreviewPlatform IOSMetalSM5
- Raw value:
LevelEditor.PreviewMode.iOSSM5.Enabled
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/LevelEditorToolBar.cpp:113
Scope (from outer to inner):
file
namespace PreviewModeFunctionality
function FSlateIcon GetPreviewModeIcon
Source code excerpt:
if (Item)
{
return FSlateIcon(FAppStyle::GetAppStyleSetName(), GEditor->IsFeatureLevelPreviewActive() ? Item->ActiveIconName : Item->InactiveIconName);
}
EShaderPlatform ShaderPlatform = FDataDrivenShaderPlatformInfo::GetShaderPlatformFromName(GEditor->PreviewPlatform.PreviewShaderPlatformName);
if (ShaderPlatform == SP_NumPlatforms)
{
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Misc/DataDrivenPlatformInfoRegistry.cpp:284
Scope (from outer to inner):
file
function static void ParsePreviewPlatforms
Source code excerpt:
checkf(Item.ShaderFormat != NAME_None, TEXT("DataDrivenPlatformInfo section [PreviewPlatform %s] must specify a ShaderFormat"), *SectionName);
Item.ActiveIconPath = GetSectionString(Section.Value, FName("ActiveIconPath"));
Item.ActiveIconName = *GetSectionString(Section.Value, FName("ActiveIconName"));
Item.InactiveIconPath = GetSectionString(Section.Value, FName("InactiveIconPath"));
Item.InactiveIconName = *GetSectionString(Section.Value, FName("InactiveIconName"));
Item.ShaderPlatformToPreview = *GetSectionString(Section.Value, FName("ShaderPlatform"));
Item.PreviewFeatureLevelName = *GetSectionString(Section.Value, FName("PreviewFeatureLevel"));
checkf(Item.ShaderPlatformToPreview != NAME_None, TEXT("DataDrivenPlatformInfo section [PreviewPlatform %s] must specify a ShaderPlatform"), *SectionName);
#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/Misc/DataDrivenPlatformInfoRegistry.h:103
Scope: file
Source code excerpt:
FName PreviewFeatureLevelName;
FString ActiveIconPath;
FName ActiveIconName;
FString InactiveIconPath;
FName InactiveIconName;
FText OptionalFriendlyNameOverride;
FText MenuTooltip;
FText IconText;
FName DeviceProfileName;
#Loc: <Workspace>/Engine/Source/Runtime/SlateCore/Private/Styling/StarshipCoreStyle.cpp:1002
Scope (from outer to inner):
file
function TSharedRef<ISlateStyle> FStarshipCoreStyle::Create
Source code excerpt:
if (!Item.ActiveIconPath.IsEmpty())
{
Style->Set(Item.ActiveIconName, new PLATFORM_IMAGE_BRUSH(Item.PlatformName, Item.ActiveIconPath, Icon40x40));
}
if (!Item.InactiveIconPath.IsEmpty())
{
Style->Set(Item.InactiveIconName, new PLATFORM_IMAGE_BRUSH(Item.PlatformName, Item.InactiveIconPath, Icon40x40));
}
}