![]() |
UCefView 1.0.24
Install On Fab
World's highest-performance WebView plugin for Unreal Engine. UCefView delivers GPU-accelerated rendering, seamless cross-platform integration and both C++ code and Blueprint development approaches.
|
UCefView provides several methods for loading web resources, usually you just need to set the Url property to load the online or local file resource.
https://....file:// path.When you need to deploy a fully self-hosted web application (e.g., a Single Page Application built with React, Vue, or Angular), the Resource Mapping feature is incredibly useful.
Resource mapping allows you to map a local directory or a ZIP archive to a custom domain (e.g., https://my-app.local). Afterwards, you can navigate to this URL in UCefView to access your local resources as if they were a real online website.
UCefView provides two scopes for configuring resource mappings:
UCefView supports two types of local resource mappings: FArchiveFileResourceMapping and FLocalFolderResourceMapping.
Maps a local ZIP archive to a URL. This is convenient for distributing and managing web resources as a single file.
For example, if you have a web-app.zip file with the following structure:
You can create an FArchiveFileResourceMapping to map https://my-app.local to this ZIP file. When you navigate to https://my-app.local/index.html, UCefView will serve the content from within the archive.
Maps a local folder to a URL. This is extremely useful during development, as it allows you to see changes to your web files instantly without needing to re-package them.
For example, if your web app's build output is in a local folder:
You can create an FLocalFolderResourceMapping to map https://my-app.local to the D:/dev/my-web-app/dist/ directory.
Path property. You can use the Convert to Absolute Path node in Blueprints or FPaths::ConvertRelativePathToFull in C++ to ensure correctness.You can also dynamically add resource mappings to a UCefView widget in Blueprints.
| Scope | Type | Property / Function | Description |
|---|---|---|---|
| Global | Folder | UCefSettings::LocalFolderResourceMapping | Defines global folder mappings in Project Settings. |
| Archive | UCefSettings::ArchiveFileResourceMapping | Defines global archive mappings in Project Settings. | |
| Folder | UCefContext::AddLocalFolderResource | Adds a global folder mapping at runtime. | |
| Archive | UCefContext::AddArchiveFileResource | Adds a global archive mapping at runtime. | |
| Instance (UMG) | Folder | UCefView::LocalFolderResourceMapping | Defines per-instance folder mappings in the Details panel. |
| Archive | UCefView::ArchiveFileResourceMapping | Defines per-instance archive mappings in the Details panel. | |
| Folder | UCefView::AddLocalFolderResource | Adds a folder mapping to a single UMG widget via Blueprint or C++. | |
| Archive | UCefView::AddArchiveFileResource | Adds an archive mapping to a single UMG widget via Blueprint or C++. | |
| Instance (Slate) | Folder | SCefView::AddLocalFolderResource | Adds a folder mapping to a single Slate widget in C++. |
| Archive | SCefView::AddArchiveFileResource | Adds an archive mapping to a single Slate widget in C++. |