Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/getnamo/BLUI-Unreal
CEF based HTML UI for the Unreal Engine.
https://github.com/getnamo/BLUI-Unreal
cef chromium html ue4 ue5 unreal
Last synced: about 1 month ago
JSON representation
CEF based HTML UI for the Unreal Engine.
- Host: GitHub
- URL: https://github.com/getnamo/BLUI-Unreal
- Owner: getnamo
- License: mit
- Fork: true (ashea-code/BLUI)
- Created: 2015-11-02T22:14:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T03:49:24.000Z (about 2 months ago)
- Last Synced: 2024-10-24T21:07:01.286Z (about 2 months ago)
- Topics: cef, chromium, html, ue4, ue5, unreal
- Language: C++
- Homepage:
- Size: 623 KB
- Stars: 366
- Watchers: 27
- Forks: 74
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![release](https://img.shields.io/github/release/getnamo/BLUI.svg?style=flat-square)](https://github.com/getnamo/BLUI-Unreal/releases)
![BLUI-logo](https://cloud.githubusercontent.com/assets/1334174/5969395/201a1202-a7f1-11e4-98a4-12bc6793f830.png)
[![Github All Releases](https://img.shields.io/github/downloads/getnamo/BLUI-Unreal/total.svg)](https://github.com/getnamo/BLUI-Unreal/releases)## Getnamo Fork Notes
A fork of BLUI that is kept relatively up to date.
Latest release is updated to [CEF 90.0.4430.212](https://bitbucket.org/chromiumembedded/cef/src/4430/). See https://github.com/getnamo/BLUbrowser for repo for cef process build.
To install check out the latest releases https://github.com/getnamo/BLUI-Unreal/releases and drag and drop *Plugins* folder into your project root folder
Unreal thread: https://forums.unrealengine.com/community/released-projects/29036-blui-open-source-html5-js-css-hud-ui
[Discord Server](https://discord.gg/qfJUyxaW4s)
### Convenience Blueprints
The native plugin didn't contain any self contained drag and drop examples so I've added some.
![examples](https://i.imgur.com/UOCEHM8.png)
### BluiWidget
A user widget (UMG) blueprint which embeds a BLU texture as an image brush. Contains various utility functions to allow loading and parsing urls easily. Call ```InitBluEye``` with starting url and browser window size to start this widget. See *BluiWorldWidgetActorExample* for an example of how it's used in practice.
### BluiWorldWidgetActorExample
Encapsulated *BluiWidget* user widget in an actor. Drag and drop this actor into your scene and it will auto-spawn the required *BluTickActor* to make everything work.
![example output](https://i.imgur.com/bso2ah6.png)
*3 BluiWorldWIdgetActorExample actors with ```youtube.com```, ```blui ue4``` and ```local://test.html``` specified as their URL respectively*
#### Url
By default the actor will check the url for ```local://``` protocol and load local content first if detected. This should be placed inside the following directory: ```{project root}/Content/html```. NB: You can still use the vanilla ```blui://``` protocol which will load content relative to your project root.
![local url](https://i.imgur.com/30hk67Z.png)
*e.g. having a test.html file inside your Content/html folder*
Basic URL validity is also tested, but you can safely ignore http:// etc. E.g. just specifying youtube.com will resolve correctly
![](https://i.imgur.com/R6we4jO.png)
If your URL isn't valid however, it will redirect the string as a search term e.g. typing a sentance or a search term.
![auto-search](https://i.imgur.com/iDoXyFy.png)
You can untick *Should Auto Search Invalid Url* to disable this behavior.
#### Resize
By default the actor has a BLUI resolution of 1000x1000, you can change this by just changing the user widget draw size.![resize](https://i.imgur.com/kB8X4I5.png)
### BluTickActor
Since 4.0.0 - This actor is no longer needed. Ticking happens internally.
Older verions:
Instead of ticking in your level bp, I prefer to use a simple actor to do the ticking. Other convenience blueprints may spawn this as necessary so if you use those, you don't ever need to use this directly.## Demo Project
Thanks to @oivio we have the Demo project updated to the latest release. See https://github.com/getnamo/BLUI-Unreal/releases/tag/3.4.0 for the 4.22 Demo project release ([BLUI-v3.4.0-UE4.22-DemoExamples.7z](https://github.com/getnamo/BLUI-Unreal/releases/download/3.4.0/BLUI-v3.4.0-UE4.22-DemoExamples.7z))
### Video of Demo project
[![Demo Project](https://img.youtube.com/vi/PRxO0yCO3Kk/0.jpg)](https://youtu.be/PRxO0yCO3Kk)
Click on image to take you to video.
What is it?
---------------------------------------
BLUI is an Unreal Engine 4 plugin that allows easy interaction with the Chromium Embedded Framework. It provides a simple Material Instance and input functions to help streamline the rendering of rich HTML interfaces.BLUI tries to stay out of the way as much as possible. All rendering of the DOM and processing of the JavaScript happens in a separate process, just like Chromium. BLUI only updates the texture inside the material instance when Chromium requests a redraw, not every tick, saving a bit more processing along the way.
Features
---------------------------------------
+ Chromium Powered (same thing that powers Google Chrome!)
+ Fully compatible with every web technology that Chrome/Chromium works with. (HTML5, WebAudio, WebSockets etc.)
+ No specific ties to ***any*** in game class, simple use Blueprints (or C++) to create a new "BluEye" object and grab its material instance, then you can paint it on anything!
+ Execute JavaScript in the "browser" from your game to pass data to the web page
+ Using `blu_event` JS native function you can pass data from the page's JavaScript back into UE4!
+ C++ or Blueprints, works with both!Setting up the editor and project
---------------------------------------
Then copy the `BLUI` folder into the "Plugins" folder within your **project** directory, and enable the plugin.Re-generate your project's Visual Studio file and load up the editor. Then check the plugin list to ensure it has been loaded!
Loading Local Files
---------------------------------------
Set your default URL or use the "Load URL" node/method to load a URL that starts with `local://` this will point to the Content/html directory root of the project or the game (if packaged). So if you wanted to load an HTML file from `YourProject/Content/html/UI/file.html`, set the URL to `local://UI/file.html`