InactiveIconName

InactiveIconName

#Overview

name: InactiveIconName

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 InactiveIconName is to store the name of the icon used to represent an inactive state for a specific preview platform or feature in the Unreal Engine editor interface.

This setting variable is primarily used by the Level Editor and the Data-Driven Platform Info Registry subsystems within Unreal Engine. It’s also utilized by the Slate Core styling system for rendering the appropriate icons in the user interface.

The value of this variable is typically set in the Data-Driven Platform Info Registry. Specifically, it’s parsed from a configuration file in the ParsePreviewPlatforms function within the DataDrivenPlatformInfoRegistry.cpp file.

InactiveIconName interacts closely with other variables such as ActiveIconName, InactiveIconPath, and various other properties related to preview platforms and shader platforms. It’s part of a larger structure that defines the visual representation and behavior of preview platforms in the editor.

Developers should be aware that this variable is crucial for the correct display of icons in the Level Editor’s toolbar, particularly when switching between different preview modes or platforms. The icon represented by this name is displayed when the associated preview mode or platform is not active.

Best practices when using this variable include:

  1. Ensuring that the icon name referenced exists in the appropriate style set.
  2. Maintaining consistency between the active and inactive icon designs for better user experience.
  3. Using descriptive and unique names for each platform or feature to avoid conflicts.
  4. Regularly updating the icons and their names to reflect any changes in the engine’s UI design or new preview features.
  5. Considering the scalability of icons across different resolutions when setting up new inactive icons.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:29, section: [PreviewPlatform AndroidES31]

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:40, section: [PreviewPlatform AndroidVulkan]

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:51, section: [PreviewPlatform AndroidVulkanSM5]

Location: <Workspace>/Engine/Config/IOS/DataDrivenPlatformInfo.ini:32, section: [PreviewPlatform IOSMetal]

Location: <Workspace>/Engine/Config/IOS/DataDrivenPlatformInfo.ini:44, section: [PreviewPlatform IOSMetalSM5]

#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:286

Scope (from outer to inner):

file
function     static void ParsePreviewPlatforms

Source code excerpt:

				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);
				FTextStringHelper::ReadFromBuffer(*GetSectionString(Section.Value, FName("MenuTooltip")), Item.MenuTooltip);
				FTextStringHelper::ReadFromBuffer(*GetSectionString(Section.Value, FName("IconText")), Item.IconText);

#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/Misc/DataDrivenPlatformInfoRegistry.h:105

Scope: file

Source code excerpt:

	FName ActiveIconName;
	FString InactiveIconPath;
	FName InactiveIconName;
	FText OptionalFriendlyNameOverride;
	FText MenuTooltip;
	FText IconText;
	FName DeviceProfileName;
};

#Loc: <Workspace>/Engine/Source/Runtime/SlateCore/Private/Styling/StarshipCoreStyle.cpp:1006

Scope (from outer to inner):

file
function     TSharedRef<ISlateStyle> FStarshipCoreStyle::Create

Source code excerpt:

			if (!Item.InactiveIconPath.IsEmpty())
			{
				Style->Set(Item.InactiveIconName, new PLATFORM_IMAGE_BRUSH(Item.PlatformName, Item.InactiveIconPath, Icon40x40));
			}
		}
#endif

	}