DialogueFilenameFormat
DialogueFilenameFormat
#Overview
name: DialogueFilenameFormat
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 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of DialogueFilenameFormat is to define the naming convention for dialogue audio files in Unreal Engine 5. This setting variable is primarily used in the audio system, specifically for handling dialogue assets.
The DialogueFilenameFormat variable is utilized by the Engine’s audio subsystem, particularly in the Dialogue Wave functionality. It is referenced in the AudioSettings class and used in the DialogueWave module.
The value of this variable is set in the Audio Settings of the Unreal Engine project. It can be accessed and modified through the Project Settings menu in the Unreal Editor, under the “Audio” category.
This variable interacts with other components of the dialogue system, such as the LocalizationGUID, DialogueName, and ContextMapping. It is used in conjunction with these variables to generate unique and consistent filenames for recorded dialogue audio files.
Developers must be aware that changing this variable will affect the naming of all dialogue audio files in the project. It’s crucial to maintain consistency in the naming format throughout the development process to avoid issues with file referencing and asset management.
Best practices when using this variable include:
- Choosing a clear and consistent naming convention that includes relevant information (e.g., dialogue ID, context, language).
- Avoiding characters that may cause issues in file systems or cross-platform development.
- Ensuring the format string includes placeholders for all necessary information (e.g., {dialogueguid}, {dialoguename}, {contextid}, {contextindex}).
- Documenting the chosen format and communicating it to all team members involved in dialogue asset creation and management.
- Considering localization requirements when defining the format to accommodate multiple language versions of dialogue assets.
By following these practices, developers can maintain a well-organized and easily navigable dialogue asset structure within their Unreal Engine 5 project.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:1604, section: [/Script/Engine.AudioSettings]
- INI Section:
/Script/Engine.AudioSettings
- Raw value:
"{DialogueGuid}_{ContextId}"
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:266, section: [/Script/Engine.AudioSettings]
- INI Section:
/Script/Engine.AudioSettings
- Raw value:
"{DialogueGuid}_{ContextId}"
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/DetailCustomizations/Private/AudioSettingsDetails.cpp:32
Scope (from outer to inner):
file
function void FAudioSettingsDetails::CustomizeDetails
Source code excerpt:
void FAudioSettingsDetails::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder)
{
DialogueFilenameFormatProperty = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(UAudioSettings, DialogueFilenameFormat));
DialogueFilenameFormatProperty->MarkHiddenByCustomization();
IDetailCategoryBuilder& DialogueCategoryBuilder = DetailBuilder.EditCategory("Dialogue", LOCTEXT("DialogueCategoryLabel", "Dialogue"));
DialogueCategoryBuilder.AddCustomRow(DialogueFilenameFormatProperty->GetPropertyDisplayName())
.NameContent()
[
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Sound/AudioSettings.h:240
Scope (from outer to inner):
file
class class UAudioSettings : public UDeveloperSettings
Source code excerpt:
*/
UPROPERTY(config, EditAnywhere, Category="Dialogue")
FString DialogueFilenameFormat;
/**
* Sounds only packaged in non-shipped builds for debugging.
*/
UPROPERTY(config, EditAnywhere, Category = "Debug")
TArray<FSoundDebugEntry> DebugSounds;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/DialogueWave.cpp:759
Scope (from outer to inner):
file
function FString UDialogueWave::GetContextRecordedAudioFilename
Source code excerpt:
{
const UAudioSettings* AudioSettings = GetDefault<UAudioSettings>();
const FString DialogueContextFilename = BuildRecordedAudioFilename(AudioSettings->DialogueFilenameFormat, LocalizationGUID, GetName(), ContextMapping.GetLocalizationKey(), ContextMappings.IndexOfByKey(ContextMapping));
return FString::Printf(TEXT("%s.wav"), *DialogueContextFilename);
}
FString UDialogueWave::BuildRecordedAudioFilename(const FString& FormatString, const FGuid& DialogueGuid, const FString& DialogueName, const FString& ContextId, const int32 ContextIndex)
{
static const FString DialogueWaveSuffix = TEXT("_DialogueWave");