ImportedDialogueFolder
ImportedDialogueFolder
#Overview
name: ImportedDialogueFolder
The value of this variable can be defined or overridden in .ini config files. 2
.ini config files referencing this setting variable.
It is referenced in 9
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ImportedDialogueFolder is to specify the folder in which to create generated sound waves for imported dialogue in Unreal Engine’s localization system.
This setting variable is primarily used by the localization system in Unreal Engine. It is referenced in the Localization module and the UnrealEd module, specifically in components dealing with importing localized dialogue.
The value of this variable is typically set in the localization configuration settings. It’s defined as a property in the FLocalizationImportDialogueSettings struct with a default value of “ImportedDialogue”.
ImportedDialogueFolder interacts with other localization-related variables, such as RawAudioPath and bImportNativeAsSource. It’s used in conjunction with these to determine the full path for importing and storing localized audio assets.
Developers must be aware that this variable affects the directory structure of imported dialogue assets. Changing it could impact existing localization workflows and asset references.
Best practices when using this variable include:
- Keeping it consistent across projects to maintain a standardized localization structure.
- Ensuring it doesn’t conflict with other asset folders to avoid potential naming collisions.
- Considering the implications on asset management and version control when modifying this value.
- Documenting any custom values used for this setting to maintain clear localization pipelines.
#Setting Variables
#References In INI files
Location: <Workspace>/Projects/Lyra/Config/Localization/EngineOverrides_ImportDialogue.ini:26, section: [GatherTextStep0]
- INI Section:
GatherTextStep0
- Raw value:
ImportedDialogue
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/Localization/Game_ImportDialogue.ini:26, section: [GatherTextStep0]
- INI Section:
GatherTextStep0
- Raw value:
ImportedDialogue
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Developer/Localization/Private/LocalizationConfigurationScript.cpp:1046
Scope (from outer to inner):
file
namespace LocalizationConfigurationScript
function FLocalizationConfigurationScript GenerateImportDialogueConfigFile
Source code excerpt:
ConfigSection.Add(TEXT("RawAudioPath"), Target->Settings.ImportDialogueSettings.RawAudioPath.Path);
ConfigSection.Add(TEXT("ImportedDialogueFolder"), Target->Settings.ImportDialogueSettings.ImportedDialogueFolder);
ConfigSection.Add(TEXT("bImportNativeAsSource"), Target->Settings.ImportDialogueSettings.bImportNativeAsSource ? TEXT("true") : TEXT("false"));
Script.AddGatherTextStep(0, MoveTemp(ConfigSection));
}
Script.Dirty = true;
#Loc: <Workspace>/Engine/Source/Developer/Localization/Public/LocalizationTargetTypes.h:365
Scope (from outer to inner):
file
function FLocalizationImportDialogueSettings
Source code excerpt:
FLocalizationImportDialogueSettings()
: ImportedDialogueFolder(TEXT("ImportedDialogue"))
, bImportNativeAsSource(false)
{
}
/** Path to the folder to import the audio from. This folder is expected to contain culture sub-folders, which in turn contain the raw WAV files to import. */
UPROPERTY(config, EditAnywhere, Category="Dialogue")
#Loc: <Workspace>/Engine/Source/Developer/Localization/Public/LocalizationTargetTypes.h:376
Scope: file
Source code excerpt:
/** Folder in which to create the generated sound waves. This is relative to the root of the L10N culture folder (or the root content folder if importing native dialogue as source dialogue). */
UPROPERTY(config, EditAnywhere, Category="Dialogue")
FString ImportedDialogueFolder;
/** Should the dialogue for the native culture be imported as if it were source audio? If false, the native culture dialogue will be imported as localized data for the native culture. */
UPROPERTY(config, EditAnywhere, Category="Dialogue")
bool bImportNativeAsSource;
};
#Loc: <Workspace>/Engine/Source/Editor/LocalizationCommandletExecution/Private/LocalizationCommandletTasks.cpp:563
Scope (from outer to inner):
file
function bool LocalizationCommandletTasks::ReportLoadedAudioAssets
Source code excerpt:
{
DialogueWavePathsToTest.Add(RootAssetPath);
SoundWavePathsToTest.Add(RootAssetPath / Target->Settings.ImportDialogueSettings.ImportedDialogueFolder);
}
for (const FString& Culture : CulturesToTest)
{
if (bImportNativeAsSource && Culture == NativeCulture)
{
#Loc: <Workspace>/Engine/Source/Editor/LocalizationCommandletExecution/Private/LocalizationCommandletTasks.cpp:574
Scope (from outer to inner):
file
function bool LocalizationCommandletTasks::ReportLoadedAudioAssets
Source code excerpt:
DialogueWavePathsToTest.Add(RootAssetPath / TEXT("L10N") / Culture);
SoundWavePathsToTest.Add(RootAssetPath / TEXT("L10N") / Culture / Target->Settings.ImportDialogueSettings.ImportedDialogueFolder);
}
}
ForEachObjectOfClass(UDialogueWave::StaticClass(), [&](UObject* InObject)
{
const FString ObjectPath = InObject->GetPathName();
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/ImportLocalizedDialogueCommandlet.cpp:123
Scope (from outer to inner):
file
function int32 UImportLocalizedDialogueCommandlet::Main
Source code excerpt:
// Folder in which to place automatically imported sound wave assets
FString ImportedDialogueFolder;
if (!GetStringFromConfig(*SectionName, TEXT("ImportedDialogueFolder"), ImportedDialogueFolder, ConfigPath))
{
UE_LOG(LogImportLocalizedDialogueCommandlet, Error, TEXT("No imported dialogue folder specified."));
return -1;
}
if (ImportedDialogueFolder.IsEmpty())
{
UE_LOG(LogImportLocalizedDialogueCommandlet, Error, TEXT("Imported dialogue folder cannot be empty."));
return -1;
}
// Load the manifest and all archives
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/ImportLocalizedDialogueCommandlet.cpp:173
Scope (from outer to inner):
file
function int32 UImportLocalizedDialogueCommandlet::Main
Source code excerpt:
CultureImportInfo.LocalizedRootContentPath = RootContentDir / TEXT("L10N") / CultureName;
CultureImportInfo.LocalizedRootPackagePath = RootAssetPath / TEXT("L10N") / CultureName;
CultureImportInfo.LocalizedImportedDialoguePackagePath = CultureImportInfo.LocalizedRootPackagePath / ImportedDialogueFolder;
CultureImportInfo.bIsNativeCulture = CultureName == NativeCulture;
}
// Find all of the existing localized dialogue and sound waves - we'll keep track of which ones we process so we can delete any that are no longer needed
TArray<FAssetData> LocalizedAssetsToPotentiallyDelete;
{
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/ImportLocalizedDialogueCommandlet.cpp:185
Scope (from outer to inner):
file
function int32 UImportLocalizedDialogueCommandlet::Main
Source code excerpt:
// We always add the source imported dialogue folder to ensure we clean it up correctly if we change the "import native as source" option
// This is also why we always add the native culture, even though only one will be in use at any one time
LocalizedSoundWavePathsToSearch.Add(*(RootAssetPath / ImportedDialogueFolder));
for (const auto& CultureImportInfoPair : CultureImportInfoMap)
{
const FCultureImportInfo& CultureImportInfo = CultureImportInfoPair.Value;
LocalizedDialogueWavePathsToSearch.Add(*CultureImportInfo.LocalizedRootPackagePath);
LocalizedSoundWavePathsToSearch.Add(*CultureImportInfo.LocalizedImportedDialoguePackagePath);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/ImportLocalizedDialogueCommandlet.cpp:232
Scope (from outer to inner):
file
function int32 UImportLocalizedDialogueCommandlet::Main
Source code excerpt:
SourceCultureImportInfo.LocalizedRootContentPath = RootContentDir;
SourceCultureImportInfo.LocalizedRootPackagePath = RootAssetPath;
SourceCultureImportInfo.LocalizedImportedDialoguePackagePath = SourceCultureImportInfo.LocalizedRootPackagePath / ImportedDialogueFolder;
ImportDialogueForCulture(LocTextHelper, DialogueWave, DialogueWaveSubPath, SourceCultureImportInfo, /*bImportAsSource*/true);
}
// Iterate over each context looking for new audio to import
for (const auto& CultureImportInfoPair : CultureImportInfoMap)