![]() |
UCefView
|
Represents the settings for CEF context initialization and configuration. More...
#include <CefSettings.h>
Public Attributes | |
FName | BridgeObjectName = TEXT("UCefViewBridge") |
The name of the bridge object injected into all browser frames. This object enables communication between JavaScript running in web content and native C++ code. | |
FName | BuiltinSchemeName = TEXT("UCefView") |
The name of the built-in custom URI scheme used by the CEF context. | |
FString | UserAgent |
The user agent string sent by the browser to web servers. | |
TArray< FArchiveFileResourceMapping > | ArchiveFileResourceMapping |
Archive file resource mappings for serving web content from .zip files. Only zip format is supported. Each mapping associates a virtual URL with a zip archive. | |
TArray< FLocalFolderResourceMapping > | LocalFolderResroucesMapping |
Local folder resource mappings for serving web content from directories on disk. | |
FColor | BackgroundColor = FColor::White |
The background color used for browser rendering. | |
FString | Locale |
The locale to use for browser UI and web content. | |
TArray< FString > | AcceptLanguageList |
List of accepted languages for HTTP requests, used in the "Accept-Language" header. | |
bool | PersistSessionCookies = true |
Whether to persist session cookies across browser restarts. | |
bool | PersistUserPreferences = true |
Whether to persist user preferences (such as autofill data, settings, etc.). | |
ECefLogLevel | LogLevel = ECefLogLevel::Default |
The log level for CEF diagnostic output. | |
int32 | RemoteDebuggingport = 0 |
The port number for remote debugging with Chrome/Edge Dev Tools. | |
bool | DisableCommandLineArgsPassthrough = false |
Whether to disable passing the application command line arguments to CEF. | |
bool | DisableSandbox = true |
Whether to disable the Chromium sandbox. (Only applicable on macOS platform.) | |
TMap< FString, FString > | CommandLineArgs |
Additional command line arguments to be passed to CEF. | |
Represents the settings for CEF context initialization and configuration.
UCefSettings allows you to customize the behavior of the embedded Chromium browser in your Unreal Engine project. These settings control aspects such as resource mapping, localization, logging, debugging, and browser interoperability. Changes to these settings should be made before any CEF browser instances are created.
Example usage:
TArray<FString> UCefSettings::AcceptLanguageList |
List of accepted languages for HTTP requests, used in the "Accept-Language" header.
Provide a comma-delimited, ordered list of language codes (e.g., "en-US,fr,es"). This helps web servers deliver localized content.
TArray<FArchiveFileResourceMapping> UCefSettings::ArchiveFileResourceMapping |
Archive file resource mappings for serving web content from .zip files. Only zip format is supported. Each mapping associates a virtual URL with a zip archive.
The file path must be relative to the Game directory. This allows you to package web assets efficiently.
FColor UCefSettings::BackgroundColor = FColor::White |
The background color used for browser rendering.
This color is used as the default background for web content. Adjust it to match your application's theme.
FName UCefSettings::BridgeObjectName = TEXT("UCefViewBridge") |
The name of the bridge object injected into all browser frames. This object enables communication between JavaScript running in web content and native C++ code.
The bridge object is accessible in JavaScript as a property of the window object (e.g., window.bridgeObject
). Use this to expose native functions or data to your web UI.
FName UCefSettings::BuiltinSchemeName = TEXT("UCefView") |
The name of the built-in custom URI scheme used by the CEF context.
This scheme is used for internal resource mapping and communication between the browser and the engine.
TMap<FString, FString> UCefSettings::CommandLineArgs |
Additional command line arguments to be passed to CEF.
Use this to enable or configure advanced CEF features. Each entry maps a switch name to its value. For example: { "remote-allow-origins", "*" }
bool UCefSettings::DisableCommandLineArgsPassthrough = false |
Whether to disable passing the application command line arguments to CEF.
Disabling this can help prevent conflicts or unintended behavior caused by command line switches.
bool UCefSettings::DisableSandbox = true |
Whether to disable the Chromium sandbox. (Only applicable on macOS platform.)
Disabling the sandbox may be required for certain debugging or integration scenarios, but can reduce security.
FString UCefSettings::Locale |
The locale to use for browser UI and web content.
If empty, the default locale "en-US" is used. On Linux, this value is ignored and locale is determined by environment variables. You can also set the locale using the "lang" command-line switch.
TArray<FLocalFolderResourceMapping> UCefSettings::LocalFolderResroucesMapping |
Local folder resource mappings for serving web content from directories on disk.
The folder path must be relative to the Game Content directory. Use this to expose static assets (HTML, JS, CSS, etc.) to your CEF browser instances.
ECefLogLevel UCefSettings::LogLevel = ECefLogLevel::Default |
The log level for CEF diagnostic output.
Adjust this to control the verbosity of CEF logs. Higher verbosity can help with debugging but may impact performance.
bool UCefSettings::PersistSessionCookies = true |
Whether to persist session cookies across browser restarts.
If true, session cookies will be saved and restored. If false, they will be cleared when the browser is closed.
bool UCefSettings::PersistUserPreferences = true |
Whether to persist user preferences (such as autofill data, settings, etc.).
If true, user preferences will be saved and restored between sessions.
int32 UCefSettings::RemoteDebuggingport = 0 |
The port number for remote debugging with Chrome/Edge Dev Tools.
If set to a non-zero value, you can connect to the browser for debugging using Chrome or Edge at "localhost:[port]". Useful for inspecting and debugging web content at runtime.
FString UCefSettings::UserAgent |
The user agent string sent by the browser to web servers.
If left empty, the default Chromium user agent will be used. You can override this to identify your application or enable/disable specific web features.