ProviderModule
ProviderModule
#Overview
name: ProviderModule
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 ProviderModule is to specify the module name for an analytics provider or a DXGI swapchain provider in Unreal Engine 5. It is used in two main contexts: analytics and graphics rendering.
-
Analytics Provider: The ProviderModule is used in the StudioTelemetry plugin to determine which analytics module to load for collecting and processing telemetry data. It is part of the configuration for the FAnalyticsProviderMulticast class, which manages multiple analytics providers.
-
DXGI Swapchain Provider: In the context of graphics rendering, ProviderModule is used to identify and load the appropriate DXGI swapchain provider module for both D3D11 and D3D12 rendering interfaces.
The Unreal Engine subsystems that rely on this setting variable are:
- The StudioTelemetry plugin for analytics
- The D3D11RHI and D3D12RHI modules for graphics rendering
The value of this variable is typically set in configuration files. For analytics, it’s set in the GEngineIni file under a specific provider section. For DXGI swapchain providers, it’s determined through the modular features system.
Other variables that interact with ProviderModule include:
- For analytics: Name, UsageType
- For DXGI: ERHIInterfaceType
Developers must be aware that:
- The specified module must be available and implement the required interface (IAnalyticsProvider or IDXGISwapchainProvider).
- The module name should be correctly spelled and match the actual module name.
- Different modules may be required for different contexts (analytics vs. graphics) and platforms.
Best practices when using this variable:
- Ensure the specified module is compatible with the target platform and build configuration.
- Use appropriate error handling when loading the module to gracefully handle missing or incompatible modules.
- For analytics, consider the privacy and data collection policies when choosing and configuring providers.
- For graphics, test the application with different DXGI swapchain providers to ensure compatibility and performance across various hardware configurations.
- Keep the configuration up-to-date with any changes in the engine or module structure.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:3578, section: [StudioTelemetry.Log]
- INI Section:
StudioTelemetry.Log
- Raw value:
AnalyticsLog
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Experimental/StudioTelemetry/Source/StudioTelemetry/Private/AnalyticsProviderMulticast.cpp:75
Scope (from outer to inner):
file
function FAnalyticsProviderMulticast::FAnalyticsProviderMulticast
Source code excerpt:
FString ProviderModuleName;
if (GConfig->GetString(*ProviderSection, TEXT("ProviderModule"), ProviderModuleName, GEngineIni))
{
TSharedPtr<IAnalyticsProvider> AnalyticsProvider;
FString Name = GetAnalyticsProviderConfiguration("Name", true);
if ( Name.IsEmpty() )
#Loc: <Workspace>/Engine/Plugins/Experimental/StudioTelemetry/Source/StudioTelemetry/Private/AnalyticsProviderMulticast.h:15
Scope: file
Source code excerpt:
* [StudioTelemetry.Log]
* Name=LogAnalytics
* ProviderModule=AnalyticsLog
* UsageType=Editor
*
* This instructs the Multicast provider to create a Provider from the AnalyticsLog module via the IANalyticsProviderModule interface.
* See FAnalayticsLog and FAnalyticsProviderLog for more details.
*/
class FAnalyticsProviderMulticast : public IAnalyticsProvider
{
public:
using TProviders = TMap<FString, TSharedPtr<IAnalyticsProvider>>;
typedef TFunction<void(const FString& EventName, const TArray<FAnalyticsEventAttribute>& Attrs)> OnRecordEvent;
FAnalyticsProviderMulticast();
static TSharedPtr<FAnalyticsProviderMulticast> CreateAnalyticsProvider();
virtual bool StartSession(const TArray<FAnalyticsEventAttribute>& Attributes = {}) override;
virtual void EndSession() override;
virtual void FlushEvents() override;
#Loc: <Workspace>/Engine/Source/Runtime/D3D12RHI/Private/Windows/WindowsD3D12Viewport.cpp:65
Scope (from outer to inner):
file
function void FD3D12Viewport::Init
Source code excerpt:
TArray<IDXGISwapchainProvider*> DXGISwapchainProviderModules = IModularFeatures::Get().GetModularFeatureImplementations<IDXGISwapchainProvider>(IDXGISwapchainProvider::GetModularFeatureName());
IDXGISwapchainProvider* DXGISwapchainProvider = nullptr;
for (IDXGISwapchainProvider* ProviderModule : DXGISwapchainProviderModules)
{
if (ProviderModule->SupportsRHI(ERHIInterfaceType::D3D12))
{
DXGISwapchainProvider = ProviderModule;
break;
}
}
if (DXGISwapchainProvider)
{
#Loc: <Workspace>/Engine/Source/Runtime/Windows/D3D11RHI/Private/Windows/WindowsD3D11Viewport.cpp:61
Scope (from outer to inner):
file
function FD3D11Viewport::FD3D11Viewport
Source code excerpt:
TArray<IDXGISwapchainProvider*> DXGISwapchainProviderModules = IModularFeatures::Get().GetModularFeatureImplementations<IDXGISwapchainProvider>(IDXGISwapchainProvider::GetModularFeatureName());
IDXGISwapchainProvider* DXGISwapchainProvider = nullptr;
for (IDXGISwapchainProvider* ProviderModule : DXGISwapchainProviderModules)
{
if (ProviderModule->SupportsRHI(ERHIInterfaceType::D3D11))
{
DXGISwapchainProvider = ProviderModule;
break;
}
}
if (DXGISwapchainProvider)
{