![]() |
UCefView
|
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.
Sometimes you may need to load a fully self-hosted web application. In this case, you can leverage the resource mapping feature of UCefView to make it easy.
Resource mapping means you can add a mapping rule from local file (directory/zip file) to a specified URL then just navigate to the URL appending with the relative file path to access it in UCefView.
UCefView provide two mapping approaches: FArchiveFileResourceMapping
and FLocalFolderResourceMapping
Map a local archive file (e.g., ZIP) to a custom Url, allowing you to access the resources in the archive file with your custom Url.
For example, you have a zip file webres.zip
with built front-end resource in it.
You can create a FArchiveFileResourceMapping
item with the following values either by C++ code or Blueprint:
Then just navigate to your web application with https://your.site.com/index.html
in UCefView.
Map a local folder to a custom Url, allowing you to access the resources in the local directory with your custom Url.
For example, you build the WebApp project and get the output folder webres
, the folder structure is as follows:
Create a FLocalFolderResourceMapping
item with the following values either by C++ code or Blueprint:
Then just navigate to https://your.site.com/index.html
in UCefView to access your web resource.