![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Analytics.h>
Inheritance diagram for FAnalytics:Classes | |
| struct | ConfigFromIni |
Public Member Functions | |
| FAnalytics () | |
| virtual | ~FAnalytics () |
| virtual TSharedPtr< IAnalyticsProvider > | CreateAnalyticsProvider (const FName &ProviderModuleName, const FAnalyticsProviderConfigurationDelegate &GetConfigValue) |
| virtual TSharedPtr< IAnalyticsTracer > | CreateAnalyticsTracer () |
| virtual TSharedPtr< IAnalyticsProvider > | GetDefaultConfiguredProvider () |
| virtual FString | GetConfigValueFromIni (const FString &IniName, const FString &SectionName, const FString &KeyName, bool bIsRequired) |
| virtual void | WriteConfigValueToIni (const FString &IniName, const FString &SectionName, const FString &KeyName, const FString &Value) |
Public Member Functions inherited from IModuleInterface | |
| virtual | ~IModuleInterface () |
| virtual void | PreUnloadCallback () |
| virtual void | PostLoadCallback () |
| virtual bool | SupportsDynamicReloading () |
| virtual bool | SupportsAutomaticShutdown () |
| virtual bool | IsGameModule () const |
Static Public Member Functions | |
| static FAnalytics & | Get () |
| static bool | IsAvailable () |
The public interface for interacting with analytics. The basic usage is to call CreateAnalyticsProvider and supply a configuration delegate. Specific analytics providers may choose to provide strongly-typed factory methods for configuration, in which case you are free to call that directly if you know exactly what provider you will be using. This class merely facilitates loosely bound provider configuration so the provider itself can be configured purely via config.
BuildType methods exist as a common way for an analytics provider to configure itself for debug/development/playtest/release scenarios. Again, you can choose to ignore this info and provide a generic configuration delegate that does anything it wants.
To create an analytics provider using all the system defaults, simply call the static GetDefaultConfiguredProvider().
| FAnalytics::FAnalytics | ( | ) |
|
virtual |
|
virtual |
Factory function to create a specific analytics provider by providing the string name of the provider module, which will be dynamically loaded.
| ProviderModuleName | The name of the module that contains the specific provider. It must be the primary module interface. |
| GetConfigvalue | Delegate used to configure the provider. The provider will call this delegate once for each key it requires for configuration. |
|
virtual |
|
inlinestatic |
Singleton-like access to this module's interface. This is just for convenience! Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.
|
virtual |
Helper for reading configuration values from an INI file (which will be a common scenario). This is exposed here so we're not exporting more classes from the module. It's merely a helper for ConfigFromIni struct above.
|
inlinevirtual |
Creates an instance of the default configured analytics provider. Default is determined by GetDefaultProviderModuleName and a default constructed ConfigFromIni instance.
This implementation is kept in the header file to illustrate how providers are created using configuration delegates.
Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.
|
virtual |
Helper for writing configuration values from to an INI file (which will be a common scenario).