ClassSettings
ClassSettings
#Overview
name: ClassSettings
The value of this variable can be defined or overridden in .ini config files. 4
.ini config files referencing this setting variable.
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ClassSettings is to manage class-specific configuration settings within different systems of Unreal Engine 5. This variable serves multiple purposes across various subsystems:
- In the Audio Mixer module, ClassSettings is used to handle sound modulation settings for specific sound classes.
- In the Lyra game project, ClassSettings is utilized to configure replication settings for different actor classes within the custom replication graph system.
The Audio Mixer module and the Lyra game’s replication system rely on this setting variable. Specifically:
- The AudioMixer module uses ClassSettings to manage sound modulation destination settings.
- The LyraReplicationGraph in the Lyra game project uses ClassSettings to initialize global actor class settings for the custom replication graph.
The value of this variable is typically set in configuration files or through the Unreal Engine editor interface. In the Lyra game project, it’s defined as a config property in the ULyraReplicationGraphSettings class.
ClassSettings interacts with other variables and functions specific to each system:
- In the Audio Mixer, it interacts with modulation routing enums and other sound settings.
- In the Lyra replication system, it works with other replication-related settings and functions.
Developers should be aware that:
- The usage of ClassSettings varies depending on the subsystem.
- In the Audio Mixer, it’s crucial for sound modulation and affects how sound parameters are mixed and applied.
- In the Lyra replication system, it determines how different actor classes are handled in the replication graph.
Best practices when using this variable include:
- Carefully configuring ClassSettings to ensure optimal performance and desired behavior in each subsystem.
- For the Audio Mixer, understanding the sound modulation system and how ClassSettings affects sound processing.
- For the Lyra replication system, properly setting up actor class settings to achieve efficient network replication.
- Documenting any custom configurations to maintain consistency across the project.
#Setting Variables
#References In INI files
Location: <Workspace>/Projects/Lyra/Config/DefaultGame.ini:228, section: [/Script/LyraGame.LyraReplicationGraphSettings]
- INI Section:
/Script/LyraGame.LyraReplicationGraphSettings
- Raw value:
(ActorClass="/Script/Engine.PlayerState",bAddClassRepInfoToMap=True,ClassNodeMapping=NotRouted,bAddToRPC_Multicast_OpenChannelForClassMap=False,bRPC_Multicast_OpenChannelForClass=True)
- Is Array:
True
Location: <Workspace>/Projects/Lyra/Config/DefaultGame.ini:229, section: [/Script/LyraGame.LyraReplicationGraphSettings]
- INI Section:
/Script/LyraGame.LyraReplicationGraphSettings
- Raw value:
(ActorClass="/Script/Engine.LevelScriptActor",bAddClassRepInfoToMap=True,ClassNodeMapping=NotRouted,bAddToRPC_Multicast_OpenChannelForClassMap=False,bRPC_Multicast_OpenChannelForClass=True)
- Is Array:
True
Location: <Workspace>/Projects/Lyra/Config/DefaultGame.ini:230, section: [/Script/LyraGame.LyraReplicationGraphSettings]
- INI Section:
/Script/LyraGame.LyraReplicationGraphSettings
- Raw value:
(ActorClass="/Script/ReplicationGraph.ReplicationGraphDebugActor",bAddClassRepInfoToMap=True,ClassNodeMapping=NotRouted,bAddToRPC_Multicast_OpenChannelForClassMap=False,bRPC_Multicast_OpenChannelForClass=True)
- Is Array:
True
Location: <Workspace>/Projects/Lyra/Config/DefaultGame.ini:231, section: [/Script/LyraGame.LyraReplicationGraphSettings]
- INI Section:
/Script/LyraGame.LyraReplicationGraphSettings
- Raw value:
(ActorClass="/Script/LyraGame.LyraPlayerController",bAddClassRepInfoToMap=True,ClassNodeMapping=NotRouted,bAddToRPC_Multicast_OpenChannelForClassMap=False,bRPC_Multicast_OpenChannelForClass=True)
- Is Array:
True
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSource.cpp:150
Scope (from outer to inner):
file
namespace Audio
namespace ModulationUtils
function FSoundModulationDestinationSettings InitRoutedDestinationSettings
lambda-function
Source code excerpt:
if (InSoundClass)
{
const FSoundModulationDestinationSettings& ClassSettings = *InGetSoundClassDestinationFunction(*InSoundClass);
MixInRoutedValue(InParam, InOutSettings.Value, ClassSettings.Value);
InOutSettings.Modulators = InOutSettings.Modulators.Union(ClassSettings.Modulators);
}
};
switch (InActiveSoundRouting)
{
case EModulationRouting::Union:
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSource.cpp:255
Scope (from outer to inner):
file
namespace Audio
namespace ModulationUtils
function float GetRoutedDestinationValue
lambda-function
Source code excerpt:
if (InSoundClass)
{
const FSoundModulationDestinationSettings& ClassSettings = *InGetSoundClassDestinationFunction(*InSoundClass);
MixInRoutedValue(InParam, InOutValue, ClassSettings.Value);
}
};
switch (InActiveSoundRouting)
{
case EModulationRouting::Union:
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/System/LyraReplicationGraph.cpp:370
Scope (from outer to inner):
file
function void ULyraReplicationGraph::InitGlobalActorClassSettings
Source code excerpt:
// Set Classes Node Mappings
for (const FRepGraphActorClassSettings& ActorClassSettings : LyraRepGraphSettings->ClassSettings)
{
if (ActorClassSettings.bAddClassRepInfoToMap)
{
if (UClass* StaticActorClass = ActorClassSettings.GetStaticActorClass())
{
UE_LOG(LogLyraRepGraph, Log, TEXT("ActorClassSettings -- AddClassRepInfo - %s :: %i"), *StaticActorClass->GetName(), int(ActorClassSettings.ClassNodeMapping));
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/System/LyraReplicationGraph.cpp:516
Scope (from outer to inner):
file
function void ULyraReplicationGraph::InitGlobalActorClassSettings
Source code excerpt:
RPC_Multicast_OpenChannelForClass.Set(AServerStatReplicator::StaticClass(), false);
for (const FRepGraphActorClassSettings& ActorClassSettings : LyraRepGraphSettings->ClassSettings)
{
if (ActorClassSettings.bAddToRPC_Multicast_OpenChannelForClassMap)
{
if (UClass* StaticActorClass = ActorClassSettings.GetStaticActorClass())
{
UE_LOG(LogLyraRepGraph, Log, TEXT("ActorClassSettings -- RPC_Multicast_OpenChannelForClass - %s"), *StaticActorClass->GetName());
#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/System/LyraReplicationGraphSettings.h:61
Scope (from outer to inner):
file
class class ULyraReplicationGraphSettings : public UDeveloperSettingsBackedByCVars
Source code excerpt:
// Array of Custom Settings for Specific Classes
UPROPERTY(config, EditAnywhere, Category = ReplicationGraph)
TArray<FRepGraphActorClassSettings> ClassSettings;
};