

This will print the value on the screen once interacted with the VR controllers. To make sure our buttons are working correctly in game, we simply add “On Clicked” events to each button and print string nodes with the button’s number as the input. The final widget hierarchy now looks like this: Adding Functionality This stacks the buttons and equally spaces them out in the vertical box. Then, add as many buttons as you require to the vertical box. To do this, firstly create a vertical box widget component. We will now create the main container that will store our interactive buttons. The last step with the text is to set the font size to 50 and the justification to center as shown below. This is done by setting the slot position values shown below.

Then, align the text to the top and automatically adjust it’s horizontal size to the maximum size of the widget. The first widget component to add is a text block that is set to the anchor shown below. If you already have a completed widget you can skip to the “Displaying the Widget” section.įirstly, right click in the content browser and create a new widget blueprint. The widget we are creating is a main menu style widget that has a vertical list of buttons. The first aspect of this system is the creating the widget itself. – Blueprint basics in Unreal Engine 4 Creating the Widget – Creating and using Widgets in Unreal Engine 4 To follow along exactly to the guide you will need to create or use a project that was created using the VR Template.Ĭlick on the links below to learn about these topics: This guide uses the UE4 VR Template built into Unreal Engine 4. To follow this guide we recommend you know the basics of Unreal Engine 4, using the widget UI system and basic knowledge of blueprints and actors.
