bShouldGuessTypeAndNameInEditor
bShouldGuessTypeAndNameInEditor
#Overview
name: bShouldGuessTypeAndNameInEditor
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 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bShouldGuessTypeAndNameInEditor is to control whether the Asset Manager should attempt to guess the type and name of assets in the Unreal Editor environment. This setting is primarily used for asset management and organization within the Unreal Engine ecosystem.
The Unreal Engine subsystem that relies on this setting variable is the Asset Manager, which is part of the Engine module. This can be seen from the file paths and class names in the provided code references.
The value of this variable is set in the UAssetManagerSettings constructor, where it is initialized to true by default. It can be modified through the engine’s configuration system, as indicated by the UPROPERTY(config, EditAnywhere, Category = “Asset Manager”) decorator.
This variable interacts with other Asset Manager settings, such as bOnlyCookProductionAssets and bShouldAcquireMissingChunksOnLoad. It is used in conjunction with these variables to control the behavior of the Asset Manager in different scenarios.
Developers must be aware that this variable only affects the editor environment and has no impact on runtime behavior in packaged builds. It’s specifically designed to assist with asset organization and management during development.
Best practices when using this variable include:
- Keep it enabled (true) during development to help with automatic asset type and name assignment.
- Be cautious when disabling it, as it may require manual asset type and name assignments for new assets.
- Consider the impact on your project’s asset organization strategy before modifying this setting.
- Use it in conjunction with other Asset Manager settings to create a cohesive asset management strategy for your project.
- Remember that this setting does not affect packaged builds, so it’s safe to experiment with during development without impacting the final product.
#Setting Variables
#References In INI files
Location: <Workspace>/Projects/Lyra/Config/DefaultGame.ini:54, section: [/Script/Engine.AssetManagerSettings]
- INI Section:
/Script/Engine.AssetManagerSettings
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Engine/AssetManagerSettings.h:71
Scope (from outer to inner):
file
class class UAssetManagerSettings : public UDeveloperSettings
function UAssetManagerSettings
Source code excerpt:
UAssetManagerSettings()
: bOnlyCookProductionAssets(false)
, bShouldGuessTypeAndNameInEditor(true)
, bShouldAcquireMissingChunksOnLoad(false)
, bShouldWarnAboutInvalidAssets(true)
{}
/** List of asset types to scan at startup */
UPROPERTY(config, EditAnywhere, Category = "Asset Manager", meta = (TitleProperty = "PrimaryAssetType"))
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Engine/AssetManagerSettings.h:108
Scope (from outer to inner):
file
class class UAssetManagerSettings : public UDeveloperSettings
Source code excerpt:
*/
UPROPERTY(config, EditAnywhere, Category = "Asset Manager")
bool bShouldGuessTypeAndNameInEditor;
/** If true, this will query the platform chunk install interface to request missing chunks for any requested primary asset loads */
UPROPERTY(config, EditAnywhere, Category = "Asset Manager")
bool bShouldAcquireMissingChunksOnLoad;
/** If true, the asset manager will warn when it is told to load or do something with assets it does not know about */
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AssetManager.cpp:419
Scope (from outer to inner):
file
function void UAssetManager::PostInitProperties
Source code excerpt:
// In editor builds guess the type/name if allowed
bShouldGuessTypeAndName = Settings.bShouldGuessTypeAndNameInEditor;
bOnlyCookProductionAssets = Settings.bOnlyCookProductionAssets;
// In editor builds, always allow asset registry searches for in-memory asset data, as that data can change when propagating AssetBundle tags post load.
bIncludeOnlyOnDiskAssets = false;
#else
// Never guess type in cooked builds
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AssetManager.cpp:4698
Scope (from outer to inner):
file
function void UAssetManager::ReinitializeFromConfig
Source code excerpt:
// This code is editor only, so reinitialize globals
const UAssetManagerSettings& Settings = GetSettings();
bShouldGuessTypeAndName = Settings.bShouldGuessTypeAndNameInEditor;
bShouldAcquireMissingChunksOnLoad = Settings.bShouldAcquireMissingChunksOnLoad;
bOnlyCookProductionAssets = Settings.bOnlyCookProductionAssets;
if (FCoreUObjectDelegates::GetPrimaryAssetIdForObject.IsBoundToObject(this))
{
FCoreUObjectDelegates::GetPrimaryAssetIdForObject.Unbind();