Unreal SDK

Blockus provides an Unreal SDK to make it very easy to immediately add wallet support to any Unreal game.

Plugin setup & installation

  1. Request the Unreal SDK from your Blockus representative.
  2. Navigate to your project location and open the Plugins folder, if that folder doesn’t exist, create a new one.
  3. Paste the content of the unzipped files to the Plugins folder.
  4. Open the project with Unreal Engine.
  5. Activate both plugins WebUI and JsonLibrary
  6. Restart Unreal Engine and the plugins should be active for this project.

Create the widget blueprint

  1. Open the Content Drawer in the project and click the + Add button.
  2. Inside User Interface option, select Widget Blueprint
  3. When Unreal Engine as for select the parent class, click on User Widget option
  4. Set the name you want for the Widget.
  5. Open the widget blueprint.
  6. On the blueprint editor, in the palette search box, look a Canvas Panel and add to the blueprint.
  7. Look for Web Interface and place inside the canvas panel, also se the dimensions you want for the web browser.
  8. Click the Web Interface element and change the value of Initial URL to the the Blockus account management URL that was provided to you.

Open the browser widget inside the game

Now that the widget is created, you can attach the widget visualization to any event, a hit box collision, click event on button, keyboard event, etc. As an example here, we'll trigger the widget on the event BeginPlay of the level.

  1. Open the level blueprint and start a new flow with BeginPlay event.
  2. Add to the flow the function called Create Widget and select the WebBrowser class (the widget you previously created on the past tutorial)
  3. Add the function Add to viewport to the flow and connect the return value of Create Widget function to the target value of the this function.
  4. When you run the level, the widget will appear.