bFilterSearchableNames

bFilterSearchableNames

#Overview

name: bFilterSearchableNames

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 5 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bFilterSearchableNames is to control the filtering of searchable names from dependency data in the Asset Registry system of Unreal Engine 5.

This setting variable is primarily used by the Asset Registry subsystem, which is part of Unreal Engine’s core functionality for managing and querying asset metadata.

The value of this variable is typically set through configuration files, specifically in the Engine.ini file under the [AssetRegistry] section. It can be read and set programmatically using the FConfigFile interface, as seen in the InitializeSerializationOptionsFromIni function.

bFilterSearchableNames interacts with other Asset Registry configuration options, such as bFilterAssetDataWithNoTags and bFilterDependenciesWithNoTags. These options collectively determine how the Asset Registry filters and processes asset data.

Developers must be aware that enabling this option (setting it to true) will filter out searchable names from dependency data. This can affect the results of asset queries and dependency calculations, potentially reducing the amount of data stored and processed by the Asset Registry.

Best practices when using this variable include:

  1. Consider the trade-offs between performance and data completeness. Enabling filtering can improve performance and reduce memory usage, but may limit the ability to search or query certain asset dependencies.

  2. Ensure consistency across development and production environments. If you modify this setting, make sure it’s applied consistently to avoid discrepancies in asset behavior between different build configurations.

  3. Test thoroughly after changing this setting, particularly in areas of your project that rely heavily on asset queries or dependency calculations.

  4. Use in conjunction with other Asset Registry filtering options for a comprehensive asset management strategy.

  5. Document any custom settings in your project to ensure all team members understand the Asset Registry’s configuration.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:2742, section: [AssetRegistry]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/AssetRegistry/Private/AssetRegistry.cpp:1315

Scope (from outer to inner):

file
namespace    UE::AssetRegistry
namespace    Utils
function     void InitializeSerializationOptionsFromIni

Source code excerpt:

		EngineIni->GetBool(TEXT("AssetRegistry"), TEXT("bFilterAssetDataWithNoTags"), Options.bFilterAssetDataWithNoTags);
		EngineIni->GetBool(TEXT("AssetRegistry"), TEXT("bFilterDependenciesWithNoTags"), Options.bFilterDependenciesWithNoTags);
		EngineIni->GetBool(TEXT("AssetRegistry"), TEXT("bFilterSearchableNames"), Options.bFilterSearchableNames);
	}

	EngineIni->GetBool(TEXT("AssetRegistry"), TEXT("bUseAssetRegistryTagsWhitelistInsteadOfBlacklist"), Options.bUseAssetRegistryTagsAllowListInsteadOfDenyList);
	TArray<FString> FilterListItems;
	if (Options.bUseAssetRegistryTagsAllowListInsteadOfDenyList)
	{

#Loc: <Workspace>/Engine/Source/Runtime/AssetRegistry/Private/AssetRegistryState.cpp:277

Scope (from outer to inner):

file
function     void FAssetRegistryState::InitializeFromExistingAndPrune

Source code excerpt:

		bool bRemoveDependsNode = false;

		if (Options.bFilterSearchableNames && Id.IsValue())
		{
			bRemoveDependsNode = true;
		}
		else if (Id.IsPackage() &&
			!CachedAssetsByPackageName.Contains(Id.PackageName) &&
			!RequiredDependNodePackages.Contains(Id.PackageName) &&

#Loc: <Workspace>/Engine/Source/Runtime/AssetRegistry/Private/AssetRegistryState.cpp:576

Scope (from outer to inner):

file
function     void FAssetRegistryState::Prune

Source code excerpt:

		}

		if (Options.bFilterSearchableNames && Id.IsValue())
		{
			bRemoveDependsNode = true;
		}
		else if (Id.IsPackage() &&
			!CachedAssetsByPackageName.Contains(Id.PackageName) &&
			!RequiredDependNodePackages.Contains(Id.PackageName) &&

#Loc: <Workspace>/Engine/Source/Runtime/AssetRegistry/Public/AssetRegistry/AssetRegistryState.h:74

Scope: file

Source code excerpt:


	/** Filter out searchable names from dependency data */
	bool bFilterSearchableNames = false;

	/**
	 * Keep tags intended for the cooker's output DevelopmentAssetRegistry. this flag defaults to false and is set to
	 * true only by the cooker.
	 */
	bool bKeepDevelopmentAssetRegistryTags = false;

#Loc: <Workspace>/Engine/Source/Runtime/AssetRegistry/Public/AssetRegistry/AssetRegistryState.h:96

Scope (from outer to inner):

file
function     void DisableFilters

Source code excerpt:

		bFilterAssetDataWithNoTags = false;
		bFilterDependenciesWithNoTags = false;
		bFilterSearchableNames = false;
	}

private:
	void InitForDevelopment()
	{
		bSerializeAssetRegistry = bSerializeDependencies = bSerializeSearchableNameDependencies = bSerializeManageDependencies = bSerializePackageData = true;